]> git.saurik.com Git - wxWidgets.git/blobdiff - utils/wxPython/demo/wxSplitterWindow.py
1. Grid cell defaults are now handled by an internal
[wxWidgets.git] / utils / wxPython / demo / wxSplitterWindow.py
index 4a4b9b9af63ed3ab8e2eb2eedac31b6ffe2c581c..662975b5f8ddc0e7e600b9c249dcba48523378fb 100644 (file)
@@ -2,10 +2,21 @@
 from wxPython.wx import *
 
 
+#---------------------------------------------------------------------------
+
+class MySplitter(wxSplitterWindow):
+    def __init__(self, parent, ID, log):
+        wxSplitterWindow.__init__(self, parent, ID)
+        self.log = log
+        EVT_SPLITTER_SASH_POS_CHANGED(self, self.GetId(), self.OnSashChanged)
+
+    def OnSashChanged(self, evt):
+        self.log.WriteText("sash changed to " + str(evt.GetSashPosition()))
+
 #---------------------------------------------------------------------------
 
 def runTest(frame, nb, log):
-    splitter = wxSplitterWindow(nb, -1)
+    splitter = MySplitter(nb, -1, log)
 
     p1 = wxWindow(splitter, -1)
     p1.SetBackgroundColour(wxRED)