Hello,
I try to bind an event handler to a key event with Bind().
I does not work. Using the old macro works. Is this a bug or
a feature ?
Code:
class FrameProcess(wx.Frame):
def __init__(self, *args, **kwds):
# begin wxGlade: FrameProcess.__init__
kwds["style"] =
wx.CAPTION|wx.FRAME_NO_TASKBAR|wx.FRAME_FLOAT_ON_PARENT
wx.Frame.__init__(self, *args, **kwds)
self.cmdTappet = wx.Button(self, -1,
_("Tappet"))
self.cmdLight = wx.ToggleButton(self, -1,
_("Light"))
self.cmdGrab = wx.Button(self, -1,
_("Grab"))
self.__set_properties()
self.__do_layout()
# end wxGlade
wx.EVT_LEFT_DOWN( self.cmdTappet, self.OnTappet )
wx.EVT_LEFT_UP( self.cmdTappet, self.OnTappet )
# binding events with following 2 lines does not
work!
#self.Bind( wx.EVT_LEFT_DOWN, self.OnTappet,
self.cmdTappet )
#self.Bind( wx.EVT_LEFT_UP, self.OnTappet,
self.cmdTappet )
self.Bind( wx.EVT_TOGGLEBUTTON, self.OnLight,
self.cmdLight )
self.Bind( wx.EVT_BUTTON, self.OnGrab, self.cmdGrab
)
My platform:
- Windows XP,
- Python 2.3.5
- wxPython 2.6.3.2-ansi
Thanks for your help,
Matthias
--
Matthias Kirst
CLONDIAG chip technologies
------------------------------------------------------------
---------
To unsubscribe, e-mail: wxPython-users-unsubscribe lists.wxwidgets.org
For additional commands, e-mail: wxPython-users-help lists.wxwidgets.org
|