Python mouse EVT_COMMAND_LEFT_CLICK, EVT_LEFT_DOWN
SMALLp
pofuk at mzm.hr
Thu Dec 27 11:59:40 EST 2007
Hy!
I'm not able to tu bind mouse click event. Code:
class MouseClass(wx.Panel):
def __init__(self, parent, id):
wx.Panel.__init__(self, parent, id, size=(500, 300))
self.SetBackgroundColour("WHITE")
sizer = wx.BoxSizer(wx.VERTICAL)
testPanel.SetBackgroundColour("BLACK")
self.Bind(wx.EVT_COMMAND_LEFT_CLICK, self.open, id=testPanel.GetId())
sizer.Add(testPanel, 0, wx.EXPAND)
self.SetSizerAndFir(sizer)
def open(self, event):
print "yea"
U tried EVT_LEFT_DOWN as I found on goofle and couldnt get it to work.
Please help.
More information about the Python-list
mailing list