[wxPython] Disabling wxTAB_TRAVERSAL

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[wxPython] Disabling wxTAB_TRAVERSAL

lec-4
Can  wxTAB_TRAVERSAL be disabled for some controls in a wxDialog ?
What's the syntax to do this?

Thanks.



_______________________________________________
wxPython-users maillist  -  [hidden email]
http://starship.python.net/mailman/listinfo/wxpython-users



Reply | Threaded
Open this post in threaded view
|

Re: [wxPython] Disabling wxTAB_TRAVERSAL

Robin Dunn
> Can  wxTAB_TRAVERSAL be disabled for some controls in a wxDialog ?
> What's the syntax to do this?
>

I don't think so.  Tab traversal is actually handled by the panel or dialog
itself, rather than a cooperative effort between the controls.  The panel
decides which next control to give the focus to by checking IsShown() &&
IsEnabled(), and it doesn't look like you can reject the focus automatically
in an event handler.  So it looks like your options are to either disable
the control, or to catch the focus event on the controls you want to skip
and call SetFocus on the one you want to go to next.

--
Robin Dunn
Software Craftsman
[hidden email]
http://AllDunn.com/robin/
http://AllDunn.com/wxPython/  Check it out!



_______________________________________________
wxPython-users maillist  -  [hidden email]
http://starship.python.net/mailman/listinfo/wxpython-users