Frank Millman wrote:
> Hi all
>
> A minor issue.
>
> I have an HtmlWindow on the same panel as other
controls, to display some
> text. If the user tries to tab across it, it accepts
focus, and they have to
> tab again to move on.
>
> I tried subclassing HtmlWindow, and adding
> def AcceptsFocus(self):
> return False
>
> but it made no difference.
>
> I have got around it by adding
> self.Bind(wx.EVT_SET_FOCUS,self.onGotFocus)
> def onGotFocus(self,evt):
> self.Navigate()
>
> It works, but now I have to take into account shift+tab
to move backwards,
> so it is getting a bit fiddly.
>
> Should AcceptsFocus() work here?
Unfortunately, no. The C++ classes and methods have to be
specially
instrumented in order to pass virtual method calls down to
classes
derived from it in Python, and HtmlWindow has only done that
for the
HtmlWindow methods (OnLinkClicked, etc.) and not the general
wx.Window
virtuals.
--
Robin Dunn
Software Craftsman
http://wxPython.org Java
give you jitters? Relax with wxPython!
------------------------------------------------------------
---------
To unsubscribe, e-mail: wxPython-users-unsubscribe lists.wxwidgets.org
For additional commands, e-mail: wxPython-users-help lists.wxwidgets.org
|