Intellectual property has been driving the species for some five million
years. In the past 100 or so years, it's increasingly been saddled with
the chore of lining the pockets of middlemen and parasites who, sans
this lining, would lack sufficient intellect to open a can of beer.
wxDialog automatically traverses between controls, while pressing TAB key.
Is there a possibility to exclude some controls from the tabbing cycle
(so they are skipped)?
I think the only way is to disable them (call Enable(false).)
Yes, but this is not, what I need, so I tryed to hack it. For the case someone else could find it interesting, I'll try to describe:
I catch the wxNavigationKeyEvent for the control, which I want to be skipped and then I create a new wxNavigationKeyEvent and get it processed by parent wxDialog.
···
-----------------
# I create a wxButton, which I want to be skipped
....
# Then I assign it this event handler
wx.EVT_NAVIGATION_KEY(button, self._skip_navigation)
....
def _skip_navigation(self, event):
# This is based on Robin Dunn's example, which I found
# somwhere in this mailing list...
nav = wx.wxNavigationKeyEvent()
nav.SetDirection(event.GetDirection())
nav.SetEventObject(event.GetEventObject())
nav.SetCurrentFocus(self._parent) # self._parent is wxDialog
self._parent.GetEventHandler().ProcessEvent(nav)
-----------------
Intellectual property has been driving the species for some five million
years. In the past 100 or so years, it's increasingly been saddled with
the chore of lining the pockets of middlemen and parasites who, sans
this lining, would lack sufficient intellect to open a can of beer.
> I think the only way is to disable them (call Enable(false).)
>
Yes, but this is not, what I need, so I tryed to hack it. For the case
someone else could find it interesting, I'll try to describe:
I catch the wxNavigationKeyEvent for the control, which I want to be
skipped and then I create a new wxNavigationKeyEvent and get it
processed by parent wxDialog.
Good idea. I had forgotten about this.
···
--
Robin Dunn
Software Craftsman
robin@AllDunn.com Java give you jitters? http://wxPython.org Relax with wxPython!