X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/3115ef3e56082b961af85a06955b50ddf0c5738a..4a28b9b81cafbf10b32dacbdc4fe98944e3ff6c6:/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,