I'm confused

I'm looking at wxScrolledPanel.py, at the OnChildFocus() method. Here ar
the first few lines of code:

    def OnChildFocus(self, evt):
        # If the child window that gets the focus is not visible,
        # this handler will try to scroll enough to see it.
        evt.Skip()
        child = evt.GetWindow()
        .
        .
        .
        .

Am I being dense, or does having evt.Skip() right up there cause the rest to
be ignored?

Jeff Grimmett wrote:

I'm looking at wxScrolledPanel.py, at the OnChildFocus() method. Here ar
the first few lines of code:

    def OnChildFocus(self, evt):
        # If the child window that gets the focus is not visible,
        # this handler will try to scroll enough to see it.
        evt.Skip()
        child = evt.GetWindow()
        .

Am I being dense, or does having evt.Skip() right up there cause the rest to
be ignored?

Skip() just sets a flag that is evaluated after the event handler returns to ProcessEvent.

···

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

Skip() just sets a flag that is evaluated after the event handler
returns to ProcessEvent.

Ah! That wasn't apparent from the docs. Learn something new every day :slight_smile: