How to extend the time, a wxTooltip appears?

If you are using the main C++ distribution of wxWidgets, Feel free to ask any question related to wxWidgets development here. This means questions regarding to C++ and wxWidgets, not compile problems.
Post Reply
BigFreeze
Earned some good credits
Earned some good credits
Posts: 109
Joined: Wed Sep 13, 2006 10:15 am
Location: Gebesee, Germany
Contact:

How to extend the time, a wxTooltip appears?

Post by BigFreeze » Mon Jun 08, 2009 6:26 am

Hi everybody,

I have the following question: When I use wxTaskBarIcon with wxToolTip, a balloon tooltip appears when the mouse is over the icon. Can I extend the time, the tooltip is shown? I have 3 lines in the tooltip and it takes longer to read.

Or do you have any other suggestions?

Thanks in advance for your help.
It does not require a majority to prevail, but rather an irate, tireless minority keen to set brush fires in people's minds. (Samuel Adams)

OS: Windows XP Pro
Compiler: VC++ 8.0
wxWidgets: 2.8.0
IDE: VC++

extreme001
I live to help wx-kind
I live to help wx-kind
Posts: 192
Joined: Fri Dec 22, 2006 9:17 am
Location: Germany
Contact:

Post by extreme001 » Mon Jun 08, 2009 11:53 am

Use wxToolTip::SetDelay(long msecs)

BigFreeze
Earned some good credits
Earned some good credits
Posts: 109
Joined: Wed Sep 13, 2006 10:15 am
Location: Gebesee, Germany
Contact:

Post by BigFreeze » Mon Jun 08, 2009 12:04 pm

Thanks for your response, extreme001.

Like I said, I use wxTaskBarIcon to put an icon into the taskbar. With

Code: Select all

wxTaskBarIcon::SetIcon(const wxIcon& icon, const wxString& tooltip)
I can set an icon, where wxString tooltip is the tooltip of the icon. As you can see, there is no class, which is derived from wxToolTip and can handle the method SetDelay(int msecs).

I had the idea to link a wxToolTip with a wxTaskBarIcon, but that is not possible, because wxTaskBarIcon is derived from wxObject and there is no method like SetTooltip.

Even though, the tooltip shall appear longer than the standard time of about 3 or 4 seconds, it should appear over 10 seconds, if possible.

Any other suggestions?
It does not require a majority to prevail, but rather an irate, tireless minority keen to set brush fires in people's minds. (Samuel Adams)

OS: Windows XP Pro
Compiler: VC++ 8.0
wxWidgets: 2.8.0
IDE: VC++

TrV
Ultimate wxWidgets Guru
Ultimate wxWidgets Guru
Posts: 630
Joined: Wed Jul 04, 2007 1:12 pm

Post by TrV » Tue Jun 09, 2009 10:38 pm

Create your own class inherited from wxTaskBarIcon.
Then, it's gonna be easy to call a method of an object of this class.

TrV
Ultimate wxWidgets Guru
Ultimate wxWidgets Guru
Posts: 630
Joined: Wed Jul 04, 2007 1:12 pm

Post by TrV » Tue Jun 09, 2009 10:39 pm

TrV wrote:Create your own class inherited from wxTaskBarIcon.
Then, it's gonna be easy to call a method on an object of this class.

Post Reply