[wxPython-users] Capturing a mouse click on the tab of an already
selected notebook page
Andrea Gavana
andrea.gavana at gmail.com
Tue Sep 25 16:52:49 PDT 2007
Hi Bob,
On 9/26/07, Bob Klahn wrote:
> Still no luck, Robin. My main-frame initialization code now looks like this:
>
> self.nb1.Bind(wx.EVT_LEFT_DOWN, self.OnLeftDown1)
> self.nb2.Bind(wx.EVT_LEFT_DOWN, self.OnLeftDown2)
>
> def OnLeftDown1(self, evt):
> wx.CallAfter(self.SetDiagramFocus())
> evt.Skip()
>
> def OnLeftDown2(self, evt):
> wx.CallAfter(self.SetDiagramFocus())
> evt.Skip()
You shouldn't use brackets in the argument method of wx.CallAfter,
this is what the traceback is saying. Try to use the following:
def OnLeftDown1(self, evt):
wx.CallAfter(self.SetDiagramFocus)
evt.Skip()
def OnLeftDown2(self, evt):
wx.CallAfter(self.SetDiagramFocus)
evt.Skip()
Notice the missing parenthesis () in the wx.CallAfter arguments :-D :-D
Andrea.
"Imagination Is The Only Weapon In The War Against Reality."
http://xoomer.alice.it/infinity77/
More information about the wxpython-users
mailing list