]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/wx/lib/splitter.py
Update from Frank with fixes for running on wxMSW 2.7
[wxWidgets.git] / wxPython / wx / lib / splitter.py
index a56a8b696d615cb1d518e984808dbd3e03aa2e4a..6a819a41ac618a8f698a91dacae9a5e0e3a0e4f4 100644 (file)
@@ -17,7 +17,6 @@ more than once.
 """
 
 import wx
 """
 
 import wx
-import sys
 
 _RENDER_VER = (2,6,1,1)
 
 
 _RENDER_VER = (2,6,1,1)
 
@@ -134,7 +133,7 @@ class MultiSplitterWindow(wx.PyPanel):
         of the window stack.  If sashPos is given then it is used to
         size the new window.
         """
         of the window stack.  If sashPos is given then it is used to
         size the new window.
         """
-        self.InsertWindow(sys.maxint, window, sashPos)
+        self.InsertWindow(len(self._windows), window, sashPos)
 
 
     def InsertWindow(self, idx, window, sashPos=-1):
 
 
     def InsertWindow(self, idx, window, sashPos=-1):
@@ -210,6 +209,16 @@ class MultiSplitterWindow(wx.PyPanel):
         return self._sashes[idx]
 
 
         return self._sashes[idx]
 
 
+    def SetSashPosition(self, idx, pos):
+        """
+        Set the psition of the idx'th sash, measured from the left/top
+        of the window preceding the sash.
+        """
+        assert idx < len(self._sashes)
+        self._sashes[idx] = pos
+        self._SizeWindows()
+        
+
     def SizeWindows(self):
         """
         Reposition and size the windows managed by the splitter.
     def SizeWindows(self):
         """
         Reposition and size the windows managed by the splitter.