X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/3115ef3e56082b961af85a06955b50ddf0c5738a..d2c7015bf07982c3b9c3e8ca62b326e589f95e46:/wxPython/demo/ScrolledPanel.py diff --git a/wxPython/demo/ScrolledPanel.py b/wxPython/demo/ScrolledPanel.py index bd54d5bf29..2ff349b8f3 100644 --- a/wxPython/demo/ScrolledPanel.py +++ b/wxPython/demo/ScrolledPanel.py @@ -42,9 +42,10 @@ class ScrolledPanel(wxScrolledWindow): self.EnableScrolling(false, true) self.SetScrollRate(0, 20) box.SetVirtualSizeHints(self) - EVT_CHILD_FOCUS(self, self.OnChildFocus) + wxCallAfter(self.Scroll, 0, 0) # scroll back to top after initial events + def OnChildFocus(self, evt): # If the child window that gets the focus is not visible,