tooltips tab text

bfsog

Well-known member
Joined
Apr 21, 2005
Messages
50
Location
UK
Programming Experience
5-10
Lets say I have three tabs, their text is "google", "yahoo", "msn"

when the user hovers over google, the text google is shown in tooltip, also with the other 2 show their correct text.

But if they are in the yahoo tab, but not on the tab text, can i not make the tooltip show?

So only show the tooltip over the tab text?
 

bfsog

Well-known member
Joined
Apr 21, 2005
Messages
50
Location
UK
Programming Experience
5-10
Sorry, its hard to explain. Take a look at http://bfsog.co.uk/imgupload/uploads/tabs.jpg

If I hovered over the tab "Delete By Username" Or "Delete By ID" the tooltiptext is "Delete By Username" or "Delete By ID" depending on what tab.

But, lets say they are on the default (first tab which is delete by id).

On that tab, if the user puts the mouse somewhere on that tab, but not on the tab text, the tooltip is not displayed.

So, only display the tooltip if the mouse is over the tabs tab, not the tabs content?
 

kulrom

Well-known member
Joined
May 10, 2005
Messages
2,854
Location
Republic of Macedonia
Programming Experience
10+
Ok, I got you ... :) finally hahaha

Ok, this is what you need


VB.NET:
Private[/color][/size][size=2][color=#0000ff]Sub[/color][/size][size=2] TabControl1_MouseHover([/size][size=2][color=#0000ff]ByVal[/color][/size][size=2] sender [/size][size=2][color=#0000ff]As[/color][/size][size=2][color=#0000ff]Object[/color][/size][size=2], [/size][size=2][color=#0000ff]ByVal[/color][/size][size=2] e [/size][size=2][color=#0000ff]As[/color][/size][size=2] System.EventArgs) [/size][size=2][color=#0000ff]Handles[/color][/size][size=2] TabControl1.MouseHover
 
[/size][size=2][color=#0000ff]If [/color][/size][size=2][color=#0000ff]Me[/color][/size][size=2].TabControl1.SelectedTab [/size][size=2][color=#0000ff]Is [/color][/size][size=2][color=#0000ff]Me[/color][/size][size=2].TabPage1 [/size][size=2][color=#0000ff]Then[/color][/size]
[color=#0000ff][/color] 
[size=2][color=#008000]
[/color][/size][size=2][color=#0000ff]Me[/color][/size][size=2].ToolTip1.SetToolTip([/size][size=2][color=#0000ff]Me[/color][/size][size=2].TabControl1, "a")
 
[/size][size=2][color=#0000ff]ElseIf [/color][/size][size=2][color=#0000ff]Me[/color][/size][size=2].TabControl1.SelectedTab [/size][size=2][color=#0000ff]Is [/color][/size][size=2][color=#0000ff]Me[/color][/size][size=2].TabPage2 [/size][size=2][color=#0000ff]Then
 
[/color][/size][size=2][color=#0000ff]Me[/color][/size][size=2].ToolTip1.SetToolTip([/size][size=2][color=#0000ff]Me[/color][/size][size=2].TabControl1, "b")
 
[/size][size=2][color=#0000ff]ElseIf [/color][/size][size=2][color=#0000ff]Me[/color][/size][size=2].TabControl1.SelectedTab [/size][size=2][color=#0000ff]Is [/color][/size][size=2][color=#0000ff]Me[/color][/size][size=2].TabPage3 [/size][size=2][color=#0000ff]Then
 
[/color][/size][size=2][color=#0000ff]Me[/color][/size][size=2].ToolTip1.SetToolTip([/size][size=2][color=#0000ff]Me[/color][/size][size=2].TabControl1, "c")
 
[/size][size=2][color=#0000ff]End[/color][/size][size=2][color=#0000ff]If
 
[/color][/size][size=2][color=#0000ff]End[/color][/size][size=2][color=#0000ff]Sub



note that you need to refer to tabcontrol not tabpage ...

Cheers ;)
 
Last edited:

bfsog

Well-known member
Joined
Apr 21, 2005
Messages
50
Location
UK
Programming Experience
5-10
Thanks kulrom. However, (im referring to the link i gave up ^) If I am on the "delete by id" tab, and i mousehover over anywhere on that tab, the tooltip is shown.

Is it not possible? No biggy anyway, but I just thought the tab could have its own tooltip
 
Top Bottom