X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/8fa876ca9ec87e90605808bfcab4d4226965dbad..dae0faa6be08c5bb5635fd464b695ac8bb8f2b8d:/wxPython/demo/wxMultiSash.py diff --git a/wxPython/demo/wxMultiSash.py b/wxPython/demo/wxMultiSash.py index c07aa05bad..ce95868047 100644 --- a/wxPython/demo/wxMultiSash.py +++ b/wxPython/demo/wxMultiSash.py @@ -8,6 +8,14 @@ # o There appears to be a problem with the image that # the library is trying to use for the alternate cursor # +# 12/09/2003 - Jeff Grimmett (grimmtooth@softhome.net) +# +# o renamer issue shelved. +# +# 12/20/2003 - Jeff Grimmett (grimmtooth@softhome.net) +# +# o wxMultiSash -> MultiSash +# import wx import wx.lib.multisash as sash @@ -38,6 +46,10 @@ returned by GetSaveData, as it is just another object in the dictionary. #--------------------------------------------------------------------------- class TestWindow(stc.StyledTextCtrl): + + # shared document reference + doc = None + def __init__(self, parent): stc.StyledTextCtrl.__init__(self, parent, -1, style=wx.NO_BORDER) self.SetMarginWidth(1,0) @@ -52,24 +64,23 @@ class TestWindow(stc.StyledTextCtrl): wx.Font(fSize, wx.MODERN, wx.NORMAL, wx.NORMAL) ) - self.SetText(sampleText) - -class TestFrame(wx.Frame): - def __init__(self, parent, log): - wx.Frame.__init__(self, parent, -1, "Multi Sash Demo", size=(640,480)) - self.multi = sash.wxMultiSash(self,-1,pos=(0,0), size=(640,480)) - - # Use this method to set the default class that will be created when - # a new sash is created. The class's constructor needs 1 parameter - # which is the parent of the window - self.multi.SetDefaultChildClass(TestWindow) + if self.doc: + self.SetDocPointer(self.doc) + else: + self.SetText(sampleText) + TestWindow.doc = self.GetDocPointer() + + def SutdownDemo(self): + # Reset doc reference in case this demo is run again + TestWindow.doc = None + #--------------------------------------------------------------------------- def runTest(frame, nb, log): - multi = sash.wxMultiSash(nb, -1, pos = (0,0), size = (640,480)) + multi = sash.MultiSash(nb, -1, pos = (0,0), size = (640,480)) # Use this method to set the default class that will be created when # a new sash is created. The class's constructor needs 1 parameter @@ -78,17 +89,14 @@ def runTest(frame, nb, log): return multi -# win = TestPanel(nb, log) -# return win - #---------------------------------------------------------------------- overview = """
-