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>')
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…”
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>')
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>')