Discussion:
[wxPython] Capturing the ENTER key event in a wxTextCtrl
eightbits
2014-09-23 21:07:00 UTC
Permalink
Yes, an old post , I know. But, it seems to use some syntax associated with
Windows ?
I am using Linux (Ubuntu 12.04) and wonder if this post from Robin works
with Linux.
Also, is there a method or way to allow both the TAB and the Enter key to
work in the same fashion?
Thanks.



--
View this message in context: http://wxpython-users.1045709.n5.nabble.com/wxPython-Capturing-the-ENTER-key-event-in-a-wxTextCtrl-tp2275914p5722629.html
Sent from the wxPython-users mailing list archive at Nabble.com.
--
You received this message because you are subscribed to the Google Groups "wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to wxpython-users+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Nathan McCorkle
2014-09-23 21:31:33 UTC
Permalink
Post by eightbits
Yes, an old post , I know. But, it seems to use some syntax associated with
Windows ?
I am using Linux (Ubuntu 12.04) and wonder if this post from Robin works
with Linux.
Also, is there a method or way to allow both the TAB and the Enter key to
work in the same fashion?
All Robin really said was to use SetFocus... I tried something like this
recently and since my text fields were created in order I was able to
simply do this in the TE_PROCESS_ENTER handler:
event.GetEventObject().GetNextSibling().SetFocus()


What do you really want to do? I don't understand if you want TAB to get
processed like an ENTER key does (firing an event) or rather you want a TAB
character to show up in your textbox when TAB is pressed, and a newline
when ENTER is pressed.
--
You received this message because you are subscribed to the Google Groups "wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to wxpython-users+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Loading...