views:

165

answers:

1

I am creating a ToolBar within a wx.Frame init and setting the help string as follows:

def __init_(self,...):
   ...
   self.CreateStatusBar()
   tb = self.CreateToolBar(wx.TB_HORIZONTAL|wx.NO_BORDER|wx.TB_FLAT)
   tb.SetToolBitmapSize((32,32))
   tb.SetSize((-1,132))
   tb.AddTool(ID_CLASSIFIER, bmp, shortHelpString='Classifier', longHelpString='Launch Classifier')
   ...
   tb.Realize()

--yet when I mouseover the toolbar icons, the StatusBar does not get updated. I had the same problem when adding PlateButtons to the toobar instead of using AddTool. Does anyone know what I'm doing wrong?

EDIT: Just tested this on Windows and it works. Turns out it's a Mac specific problem. That said, I'm still looking for a solution.

Thanks, -Adam

A: 

I use AddLabelTool in my code and that does show the help text on the status bar:

toolbar.AddLabelTool(self.id, '', bitmap, wx.NullBitmap, self.kind, 
                     shortHelp=wx.MenuItem.GetLabelFromText(self.menuText),
                     longHelp=self.helpText)
Frank Niessink
Turns out that this doesn't work on my Mac either (OSX 10.5.8). It's starting to look like I'll need to handle the mouse events.
Adam Fraser
What wxPython version are you using?
Frank Niessink