X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/63b6646e5d4d53611c5ea665701e2b2d978fbd22..55f9f0cbc8dcf45f8d484b2f931c5c254d4404d1:/wxPython/demo/ActiveXWrapper_IE.py?ds=sidebyside diff --git a/wxPython/demo/ActiveXWrapper_IE.py b/wxPython/demo/ActiveXWrapper_IE.py index 001455286a..2e08c8e1a4 100644 --- a/wxPython/demo/ActiveXWrapper_IE.py +++ b/wxPython/demo/ActiveXWrapper_IE.py @@ -101,16 +101,23 @@ class TestPanel(wxWindow): self.location.Append(self.current) self.SetSizer(sizer) - self.SetAutoLayout(true) + self.SetAutoLayout(True) EVT_SIZE(self, self.OnSize) EVT_WINDOW_DESTROY(self, self.OnDestroy) + def ShutdownDemo(self): + # put the frame title back + if self.frame: + self.frame.SetTitle(self.titleBase) + + def OnDestroy(self, evt): if self.ie: self.ie.Cleanup() self.ie = None + self.frame = None def OnSize(self, evt): @@ -215,11 +222,15 @@ if __name__ == '__main__': style=wxDEFAULT_FRAME_STYLE|wxNO_FULL_REPAINT_ON_RESIZE) self.CreateStatusBar() self.tp = TestPanel(self, sys.stdout, self) + EVT_CLOSE(self, self.OnCloseWindow) + def OnCloseWindow(self, evt): + self.tp.Destroy() + self.Destroy() app = wxPySimpleApp() frame = TestFrame() - frame.Show(true) + frame.Show(True) app.MainLoop()