Hey all.
I'm having some trouble triggering an event to happen when a person types
in a text control. Really I want to just reset a variable if the user
changes the text in the control, but to test I tried ringing a bell and/or
displaying a messagebox.
I have these (relevent) statements:
in __init__():
self.text_ctrl_lastName - wx.TextCtrl(self, -1, "")
...
self.Bind(wx.EVT_CHAR, self.OnKey, self.text_ctrl_lastName)
...
def OnKey(self, event):
wx.MessageBox("Key!", "Error")
-or-
print "Key Down"
-or-
wx.Bell()
I expect every keycap I press while in the Last Name text field should pop a
messagebox, or ring a bell, or print a line in the console window. I don't
see what silly mistake I'm making. Can someone please nudge me?
Thanks!
Dave