[wxPython-users] best way to keep tab transversal in notebook pane?

Robin Dunn robin at alldunn.com
Fri Sep 14 16:47:12 PDT 2007


Frank Wilder wrote:
> I have an app with a series of buttons across the top of a frames and a 
> notebook across the lower half.
> 
> Currently, when the user hits the tab key on a textctrl on a notebook 
> pane, the focus is set to the next textctrl on that notebook pane. This 
> is good.
> 
> My problem is : when the user hits the tab key on the last textctrl on 
> the notebook pane, the focus is set to the first button in the frame 
> instead of the first textctrl on that notebook pane.
> 
> What's best way to enable this functionallity?

First of all, are you sure you want to do that?  How can the user get to 
the buttons without the mouse if you do?

Managing tab traversal can sometimes get a little tricky, because there 
is some platform specific and/or native code involved in the 
implementation.  You could try turning off the tab traversal style and 
catching the EVT_KEY_DOWN events from all the widgets and then calling 
Navigate yourself, or you can try doing it at the panel or notebook 
level by intercepting the EVT_NAVIGATION_KEY events.

Good Luck.

-- 
Robin Dunn
Software Craftsman
http://wxPython.org  Java give you jitters?  Relax with wxPython!





More information about the wxpython-users mailing list