I seem to have a problem with a toolbar's tooltips somehow causing a spin event as if a spin control was invoked. Whenever I move the mouse cursor over the toolbar and a tooltip tries to pop up, the spin button's event is called. Additionally, the tooltip never appears.
from wxPython.wx import *
class MyApp(wxApp):
def OnInit(self):
frame = wxFrame(None, -1, "Toolbar bug")
toolbar = frame.CreateToolBar(wxHORIZONTAL | wxNO_BORDER)
toolbar.AddSimpleTool(100, wxNullBitmap, 'Tooltip')
spinbutton = wxSpinButton(toolbar, 101, style = wxSP_VERTICAL)
toolbar.AddControl(spinbutton)
toolbar.Realize()
EVT_SPIN(self, 101, self.OnSpin)
frame.Show(true)
return true
def OnSpin(self, event):
print event
MyApp().MainLoop()