Tooltip bug?

Vb.NET 2005

I create a tooltip control in a form and enter some tooltip texts for another control. When hoovering the mouse all seems fine, the tooltip appears etc... However after a few seconds it disappears. Annoying to the user, but then comes the real annoying thing: It won't reappear again until you restart the program (or have multiple controls and hoover another control then back to the first again). This can't possibly be the desired behaviour?

I tried setting AutoPopDelay to something high but the docs says 5000 (ms) is the max.

Help?

[576 byte] By [Magos] at [2007-12-25]
# 1

It is by design. A tooltip will only be displayed for a fixed period of time then it will disappear. It will only reappear when another control gains focus. To "permanently" display a tooltip use the Show method that does not specify a timeout. Note that you'll be responsible for hiding the tooltip as well. This is considered to be non-standard behavior so you should evaluate whether you truly want to do this or not.

Michael Taylor - 10/2/06

TaylorMichaelL at 2007-8-31 > top of Msdn Tech,.NET Development,.NET Base Class Library...
# 2

Try this to keep the tool tip displayed while the pointer is over the control (longer than 5 secs):

1. Set toolTip to OwnerDraw.

2. Implement MouseHover event handler that calls toolTip.Show().

3. Implement MouseLeave event handler that calls toolTip.Hide().

Note that the toolTip fade control doesn't seem to apply if you call Hide() manually.

Dasa at 2007-8-31 > top of Msdn Tech,.NET Development,.NET Base Class Library...
# 3
I agree, it is annoying that moving away from the control and then coming back doesn't reshow the tool-tip. You should be able to get the tool-tip to display for longer than 5000ms though - try setting the value to Int16.MaxValue. That will give you 32 seconds - anything above that won't work though. You will have to show the tooltip manually if you need it to display for longer.
DaveClud at 2007-8-31 > top of Msdn Tech,.NET Development,.NET Base Class Library...

.NET Development

Site Classified