I'm sorry if this is a newbie question, but I am writing a PythonCard program and I want it to do something when I press the enter key from inside a TextBox. My code is below:
def on_SampleTextField_keyDown(self, event):
if event.keyCode == wx.WXK_RETURN:
doSomething()
else:
event.Skip()
This works fine on Linux, but when I run it on Windows it just acts as the Tab key would. After searching the web I believe Windows is treating the enter key as a navigational key, and if I were using just wxPython I would need to set the window style to wx.WANTS_CHARS . I think this should be possible in PythonCard since it just sits on top of wxPython, but I'm not sure. And if it is I wouldn't know how to do it! So if anyone has any ideas, please let me know!