projects
/
wxWidgets.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Remove explicit casts to (const char *), and replace it with .c_str();
[wxWidgets.git]
/
wxPython
/
demo
/
ScrolledPanel.py
diff --git
a/wxPython/demo/ScrolledPanel.py
b/wxPython/demo/ScrolledPanel.py
index e4a0bb507df63df4c5ce26d48d0928709b74be02..2ff349b8f39e5bc041107ab667140d675fa05b6f 100644
(file)
--- a/
wxPython/demo/ScrolledPanel.py
+++ b/
wxPython/demo/ScrolledPanel.py
@@
-10,8
+10,7
@@
class ScrolledPanel(wxScrolledWindow):
def __init__(self, parent, log):
self.log = log
wxScrolledWindow.__init__(self, parent, -1,
def __init__(self, parent, log):
self.log = log
wxScrolledWindow.__init__(self, parent, -1,
- style = wxTAB_TRAVERSAL|wxHSCROLL|wxVSCROLL)
-
+ style = wxTAB_TRAVERSAL)
box = wxBoxSizer(wxVERTICAL)
box.Add(wxStaticText(self, -1,
box = wxBoxSizer(wxVERTICAL)
box.Add(wxStaticText(self, -1,
@@
-43,9
+42,10
@@
class ScrolledPanel(wxScrolledWindow):
self.EnableScrolling(false, true)
self.SetScrollRate(0, 20)
box.SetVirtualSizeHints(self)
self.EnableScrolling(false, true)
self.SetScrollRate(0, 20)
box.SetVirtualSizeHints(self)
-
EVT_CHILD_FOCUS(self, self.OnChildFocus)
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,
def OnChildFocus(self, evt):
# If the child window that gets the focus is not visible,
@@
-73,10
+73,6
@@
class ScrolledPanel(wxScrolledWindow):
#----------------------------------------------------------------------
#----------------------------------------------------------------------
-## class ScrollToHandler(wxEvtHandler):
-## """This class helps to scroll the panel
-
-#----------------------------------------------------------------------
def runTest(frame, nb, log):
win = ScrolledPanel(nb, log)
def runTest(frame, nb, log):
win = ScrolledPanel(nb, log)