Suspending accelerator processing inside wx.TextCtrl

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Suspending accelerator processing inside wx.TextCtrl

James Scholes
Hi folks,

Just a quick question: I have an accelerator table set for my
application's main panel, and the shortcuts in it should be active
pretty much everywhere in the program.  But they include some keystrokes
that are usually reserved for moving the cursor and selecting text
inside text fields (Ctrl+Left/Right for moving by word, Shift+Left/Right
for text selection).

How can I suspend processing of those accelerators while inside a
TextCtrl so that they carry out their normal functions?  I tried setting
an accelerator table for the TextCtrl itself, and doing an event.Skip()
inside the wx.EVT_MENU handler.  I also tried setting the accelerator
table for the TextCtrl to an instance of wx.NullAcceleratorTable.  While
this does prevent the keys from triggering their panel-wide functions,
they don't actually do what they're supposed to do either.  E.g.
Ctrl+Left doesn't move by word, it just leaves the cursor where it is.

Thanks in advance for any suggestions.
James Scholes

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 [hidden email].
For more options, visit