Two questions about tooltips and wx python. One, how do I add a tooltip to a menu item? Second, how do I get tooltips to show up for disabled gui elements. (The tip reminds the user what must be done to enable that element.)
Thanks,
Davison
···
--
-----------------------------------------------------------------------
- J. Davison de St. Germain dav@cs.utah.edu (801) 581-4078 -
- Chief Software Engineer http://www.cs.utah.edu/~dav -
- SCI Institute, SE C-SAFE University of Utah -
-----------------------------------------------------------------------
Two questions about tooltips and wx python. One, how do I add a tooltip to a menu item?
Native menus don't have tooltip support, but you could probably do it using the same mechanism that is used to show the tip text in the statusbar. Bind a handler to the EVT_MENU_HIGHLIGHT event and then based on the ID and the current cursor position you could show your own tip using the wx.TipWindow.
Second, how do I get tooltips to show up for disabled gui elements. (The tip reminds the user what must be done to enable that element.)
If the native platform doesn't show tooltips for disabled items already then you can't do it with native tooltips. But again you can do something yourself with wx.TipWindow. Be warned however that I've always found tip heavy applications to be real annoying and they usually end up in the trash real quick. I expect that I'm not the only one who feels that way.
···
--
Robin Dunn
Software Craftsman http://wxPython.org Java give you jitters? Relax with wxPython!
Two questions about tooltips and wx python. One, how do I add a tooltip to a menu item?
Native menus don't have tooltip support, but you could probably do it using the same mechanism that is used to show the tip text in the statusbar. Bind a handler to the EVT_MENU_HIGHLIGHT event and then based on the ID and the current cursor position you could show your own tip using the wx.TipWindow.
Second, how do I get tooltips to show up for disabled gui elements. (The tip reminds the user what must be done to enable that element.)
If the native platform doesn't show tooltips for disabled items already then you can't do it with native tooltips. But again you can do something yourself with wx.TipWindow. Be warned however that I've always found tip heavy applications to be real annoying and they usually end up in the trash real quick. I expect that I'm not the only one who feels that way.
--
-----------------------------------------------------------------------
- J. Davison de St. Germain dav@cs.utah.edu (801) 581-4078 -
- Chief Software Engineer John Davison de St. Germain, U of U, Graduate Student -
- SCI Institute, SE C-SAFE University of Utah -
-----------------------------------------------------------------------
Hi
I'm trying to implement tool tips for menu items as suggested above.
However, in the event function for EVT_MENU_HIGHLIGHT I get a Segmentation
fault when TipWindow is instantiated.