Sign in to follow this  
Lithic

[.net] Tooltip forced display

Recommended Posts

Washu    7829
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
Lithic    345
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
joelmartinez    338
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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this