Tab selection under sizer structures

Dear List,
Is there a known problem that tab-walking in a gui doesn't work properly
when items are placed in sizer structures? I can walk through my text
controls as expected, but when coming to a wxChoice or wxButton the tab-walk
stops and cannot focus the next gui element. See my sample script to find
out what i mean.
Your help is very appreciated.
Best regards
Oliver

tab.py (1.79 KB)

Oliver Walczak wrote:

Dear List,
Is there a known problem that tab-walking in a gui doesn't work properly
when items are placed in sizer structures? I can walk through my text
controls as expected, but when coming to a wxChoice or wxButton the tab-walk
stops and cannot focus the next gui element. See my sample script to find
out what i mean.

[...]

        panel = wxPanel(self, -1, style = wxSUNKEN_BORDER)
        
The default value for style is wxTAB_TRAVERSAL, so by turning on wxSUNKEN_BORDER like this you are turning off the tab handling in the panel. (The native MSW text controls probably have some automatic tab handling, which is why you are seeing those doing the right thing.) Change it to wxSUNKEN_BORDER|wxTAB_TRAVERSAL.

ยทยทยท

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