X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/0122b7e3fcfd78f879470053c91a60e3c66537a3..c656b783895e5f99acf98db05f23c590d0945cfc:/wxPython/demo/OOR.py diff --git a/wxPython/demo/OOR.py b/wxPython/demo/OOR.py index 7306ed9efd..e0e84b0112 100644 --- a/wxPython/demo/OOR.py +++ b/wxPython/demo/OOR.py @@ -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! \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! \n") + else: + self.log.write("The objects are NOT the same! \n") + #----------------------------------------------------------------------