X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/63b6646e5d4d53611c5ea665701e2b2d978fbd22..d3a80c922c7f0932f0b3985846e58ef48e3a6da7:/wxPython/demo/ActiveXWrapper_IE.py diff --git a/wxPython/demo/ActiveXWrapper_IE.py b/wxPython/demo/ActiveXWrapper_IE.py index 001455286a..2e23f54545 100644 --- a/wxPython/demo/ActiveXWrapper_IE.py +++ b/wxPython/demo/ActiveXWrapper_IE.py @@ -111,6 +111,7 @@ class TestPanel(wxWindow): if self.ie: self.ie.Cleanup() self.ie = None + self.frame = None def OnSize(self, evt): @@ -215,7 +216,11 @@ 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()