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

@@ -64,7 +64,10 @@ class TestPanel(wxPanel):
self.SetSizer(sizer)
self.SetAutoLayout(true)
def __del__(self):
EVT_WINDOW_DESTROY(self, self.OnDestroy)
def OnDestroy(self, evt):
if self.pdf:
self.pdf.Cleanup()
self.pdf = None
@@ -114,12 +117,6 @@ if __name__ == '__main__':
wxFrame.__init__(self, None, -1, "ActiveX test -- Acrobat", size=(640, 480),
style=wxDEFAULT_FRAME_STYLE|wxNO_FULL_REPAINT_ON_RESIZE)
self.tp = TestPanel(self, sys.stdout)
EVT_CLOSE(self, self.OnCloseWindow)
def OnCloseWindow(self, event):
self.tp.pdf.Cleanup()
self.Destroy()
app = wxPySimpleApp()