move focus to the next entry

on wxPYTHON , It is default setting to move focus from an TEXTctrl to another by hitting ‘TAB key’… I want to do with hitting ’ Enter key ’ …I tried style ‘wx.TE_PROCESS_ENTER’ but it does not work …

on the other hand…on tkinter this can be accomplished by binding the entry widget with the event ‘key’ or ‘keyRelease’ (for example) to a handler and then check for key symbol like this :

        if event.keysym=='Return' :
          event.widget.event_generate('<Tab>')

so how to do that on wxPYTHON ?

…Im using windows 8

Just a guess, but, maybe binding wx.EVT_CHAR_HOOK and then in the event handling function, event.GetKeyCode() will return 13 if enter key is pressed, and you could then do something like just .SetFocus() to next item, or something?

Jacob Kruger
Blind Biker
Skype: BlindZA
“Roger Wilco wants to welcome you…to the space janitor’s closet…”

···

----- Original Message -----

From:
ali alrawi

To: wxpython-users@googlegroups.com

Sent: Thursday, 08 May, 2014 12:56 PM

Subject: [wxPython-users] move focus to the next entry

on wxPYTHON , It is default setting to move focus from an TEXTctrl to another by hitting ‘TAB key’… I want to do with hitting ’ Enter key ’ …I tried style ‘wx.TE_PROCESS_ENTER’ but it does not work …

on the other hand…on tkinter this can be accomplished by binding the entry widget with the event ‘key’ or ‘keyRelease’ (for example) to a handler and then check for key symbol like this :

          if event.keysym=='Return' : event.widget.event_generate('<Tab>')

so how to do that on wxPYTHON ?

…Im using windows 8


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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

http://wxpython-users.1045709.n5.nabble.com/Programmatically-focusing-next-widget-in-tab-order-td2373245.html

···

On Thursday, May 8, 2014 11:56:18 AM UTC+1, ali alrawi wrote:

on wxPYTHON , It is default setting to move focus from an TEXTctrl to another by hitting ‘TAB key’… I want to do with hitting ’ Enter key ’ …I tried style ‘wx.TE_PROCESS_ENTER’ but it does not work …

on the other hand…on tkinter this can be accomplished by binding the entry widget with the event ‘key’ or ‘keyRelease’ (for example) to a handler and then check for key symbol like this :

        if event.keysym=='Return' :
          event.widget.event_generate('<Tab>')

so how to do that on wxPYTHON ?

…Im using windows 8