Hello,
I have some complicated settings in a typical dialog that I have to explain in more detail. To keep the dialog minimal, I want to add a wxStaticBitmap showing a questionmark and show an in depth explanation as soon as the mouse hovers over it, just like in a wxMenuItem using SetHelp(wxString).
Is there an easy way without having to create a custom panel showing the text? wxWindowBase::SetHelpText(wxString) does not result in showing the string.
Thank you.
wxStaticBitmap help text when mouse hovers Topic is solved
Re: wxStaticBitmap help text when mouse hovers
wxRichToolTip is nice, but you have to trigger it yourself. You can't set it up so that it automatically appears like a normal tooltip.
http://docs.wxwidgets.org/trunk/classwx ... l_tip.html
http://docs.wxwidgets.org/trunk/classwx ... l_tip.html
Use the source, Luke!
-
- Ultimate wxWidgets Guru
- Posts: 539
- Joined: Fri May 22, 2009 8:52 am
- Location: Bremen, Germany
Re: wxStaticBitmap help text when mouse hovers
thanx, the description says "and a native MSW version which can be only used with text controls"? I develop for Windows.
Or is this what you meant with "trigger it yourself"? If so, how?
Or is this what you meant with "trigger it yourself"? If so, how?
Re: wxStaticBitmap help text when mouse hovers
I don't think that's true. I'm pretty sure i've used it for other controls already. Make a small test to confirm.thanx, the description says "and a native MSW version which can be only used with text controls"? I develop for Windows.
With "trigger it yourself" i mean that you have to actively show it. It doesn't appear on its own like a tooltip.Or is this what you meant with "trigger it yourself"? If so, how?
Use the source, Luke!
-
- Ultimate wxWidgets Guru
- Posts: 539
- Joined: Fri May 22, 2009 8:52 am
- Location: Bremen, Germany
Re: wxStaticBitmap help text when mouse hovers
Ok, it works, but there is no way to hide it? Seems like one can only set a timeout but I want to show a longer text that should be readable as long as the mouse is over the wxStaticBitmap.
Re: wxStaticBitmap help text when mouse hovers
I would set a long timeout, then the user can hide the tooltip by clicking outside.
Use the source, Luke!
-
- Ultimate wxWidgets Guru
- Posts: 539
- Joined: Fri May 22, 2009 8:52 am
- Location: Bremen, Germany
Re: wxStaticBitmap help text when mouse hovers
SetTimeout(0) leaves it as long as the user does not click.doublemax wrote:I would set a long timeout, then the user can hide the tooltip by clicking outside.