demo tweaks

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@16140 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
2002-07-11 20:41:21 +00:00
parent 47b2f647b9
commit 63b6646e5d
10 changed files with 73 additions and 43 deletions

View File

@@ -104,14 +104,18 @@ class TestPanel(wxWindow):
self.SetAutoLayout(true)
EVT_SIZE(self, self.OnSize)
EVT_WINDOW_DESTROY(self, self.OnDestroy)
def OnDestroy(self, evt):
if self.ie:
self.ie.Cleanup()
self.ie = None
def OnSize(self, evt):
self.Layout()
def __del__(self):
if self.ie:
self.ie.Cleanup()
self.ie = None
def OnLocationSelect(self, evt):
url = self.location.GetStringSelection()
@@ -211,11 +215,6 @@ 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, event):
self.tp.ie.Cleanup()
self.Destroy()
app = wxPySimpleApp()