ToolTips for custom tabs
-
Is it possible to attach ToolTips for individual tabs of a TabControl? I've tried setting ToolTips to TabPage and TabControl, but both attemps failed. This works in Mozilla browser for both selected and unselected tabs. The only solution I thinked up was to catch MouseMove events of a TabControl and look which tab is currently under mouse cursor. There's still a problem of how to show ToolTip (or something similar) statically. But I believe there's some cleaner and easier way.
-
Is it possible to attach ToolTips for individual tabs of a TabControl? I've tried setting ToolTips to TabPage and TabControl, but both attemps failed. This works in Mozilla browser for both selected and unselected tabs. The only solution I thinked up was to catch MouseMove events of a TabControl and look which tab is currently under mouse cursor. There's still a problem of how to show ToolTip (or something similar) statically. But I believe there's some cleaner and easier way.
-
You have to set the 'ShowToolTips' Property of the Tabcontrol to true before the Tooltips of the tabpages are shown. Greetings, Ingo ------------------------------ A bug in a Microsoft Product? No! It's not a bug it's an undocumented feature!
This doesn't work:
tabControl1.ShowToolTips = true; ToolTip tt = new ToolTip(); tt.ShowAlways = true; tt.SetToolTip(tabControl1.TabPages[0], "1"); tt.SetToolTip(tabControl1.TabPages[1], "2"); tt.SetToolTip(tabControl1, "tabcontrol");
ToolTip is shown on the tabs, but its the "tabcontrol" ToolTip. The "1" and "2" will show only when user moves cursor on the surface of the selected tab :( Still thanks. -
This doesn't work:
tabControl1.ShowToolTips = true; ToolTip tt = new ToolTip(); tt.ShowAlways = true; tt.SetToolTip(tabControl1.TabPages[0], "1"); tt.SetToolTip(tabControl1.TabPages[1], "2"); tt.SetToolTip(tabControl1, "tabcontrol");
ToolTip is shown on the tabs, but its the "tabcontrol" ToolTip. The "1" and "2" will show only when user moves cursor on the surface of the selected tab :( Still thanks.No you have to set the Tooltip directly: tabpage1.ToolTiptext = "1"; tabpage2.ToolTiptext = "2"; tabcontrol1.ShowTooltips = true; Then it should work. Greetings, Ingo ------------------------------ A bug in a Microsoft Product? No! It's not a bug it's an undocumented feature!
-
No you have to set the Tooltip directly: tabpage1.ToolTiptext = "1"; tabpage2.ToolTiptext = "2"; tabcontrol1.ShowTooltips = true; Then it should work. Greetings, Ingo ------------------------------ A bug in a Microsoft Product? No! It's not a bug it's an undocumented feature!
I'm dummy, thanks a lot! :)