]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/demo/ScrolledPanel.py
started writing wxDisplay sample
[wxWidgets.git] / wxPython / demo / ScrolledPanel.py
index bd54d5bf2913d62d1fb99047523f3320890b3a83..2ff349b8f39e5bc041107ab667140d675fa05b6f 100644 (file)
@@ -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,