开发者

wxPython: StatusBar does NOT update with long help from wxToolBar

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


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)
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜