]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/demo/OOR.py
fix text scrolling in GTK2 (patch 703988)
[wxWidgets.git] / wxPython / demo / OOR.py
index 7306ed9efd7b8c0e6f9591f00b7f83165bf0f15d..d58bc42bbdc854714c449fd6d631317bb48e2d3c 100644 (file)
@@ -30,7 +30,9 @@ class TestPanel(wxPanel):
         sizer.Add(btns, 0, wxEXPAND|wxALL, 15)
 
         self.SetSizer(sizer)
-        self.SetAutoLayout(true)
+        self.SetAutoLayout(True)
+
+        self.sizer = sizer  # save it for testing later
 
         EVT_BUTTON(self, BTN1, self.OnFindButton1)
         EVT_BUTTON(self, BTN2, self.OnFindButton2)
@@ -68,6 +70,15 @@ class TestPanel(wxPanel):
         else:
             self.log.write("The objects are NOT the same! <frown>\n")
 
+        sizer = self.GetSizer()
+        if sizer is None:
+            self.log.write("***** OOPS! None returned...\n")
+            return
+        if sizer is self.sizer:
+            self.log.write("The objects are the same! <grin>\n")
+        else:
+            self.log.write("The objects are NOT the same! <frown>\n")
+
 
 #----------------------------------------------------------------------
 
@@ -125,3 +136,12 @@ and the second will show #2 (<i>working as of 2.3.2</i>)
 
 </body></html>
 """
+
+
+
+
+if __name__ == '__main__':
+    import sys,os
+    import run
+    run.main(['', os.path.basename(sys.argv[0])])
+