• Advertisement
Sign in to follow this  

[.net] Tooltip forced display

This topic is 4945 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Advertisement
How do you mean by force it to display? As in force it to display even when the mouse isn't over it? Or force it to display even when the form doesn't have focus? If it's the later, then you can simply set the ShowAlways property of the ToolTip object to true. As for the former, I do not know of a way in which you can force tooltips to display without a mouse event.

Share this post


Link to post
Share on other sites
What I wanted was the tooltip to display when the mouse cursor hovered over something that was part of an OpenGL window. And I found a ugly hack way to do it. Use SetTooltip(...) to bind it to the OpenGL window using empty text parameters to turn off the tooltip. When the mousecursor goes over a part of the openGL window (check during a mousemove event), see if it is over any tooltip displaying objects. If it is, use SetTooltip with a string representing that tooltip. If it has moved off that object, use an empty string to reset it. This implementation has one flaw being that if you want more than one tooltip displayed at once (probably not...) this will mean that you'll need more than one Tooltip object.

Share this post


Link to post
Share on other sites
I think that's a perfectly good way to implement what you're asking about. What's so ugly about it? and I do agree that you probably would not want to display more than one tooltip at a time ... talk about confusing for the end user.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement