]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/demo/ActiveXWrapper_IE.py
fix text scrolling in GTK2 (patch 703988)
[wxWidgets.git] / wxPython / demo / ActiveXWrapper_IE.py
index c91db4d56b8a6e82e30d7c84ec4c61a6f6d5dff8..2e08c8e1a414b6f4bc2108e097858a49e5ebf3ac 100644 (file)
@@ -101,17 +101,28 @@ 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 OnSize(self, evt):
-        self.Layout()
 
-    def __del__(self):
+    def OnDestroy(self, evt):
         if self.ie:
             self.ie.Cleanup()
             self.ie = None
+            self.frame = None
+
+
+    def OnSize(self, evt):
+        self.Layout()
+
 
     def OnLocationSelect(self, evt):
         url = self.location.GetStringSelection()
@@ -213,14 +224,13 @@ if __name__ == '__main__':
             self.tp = TestPanel(self, sys.stdout, self)
             EVT_CLOSE(self, self.OnCloseWindow)
 
-        def OnCloseWindow(self, event):
-            self.tp.ie.Cleanup()
+        def OnCloseWindow(self, evt):
+            self.tp.Destroy()
             self.Destroy()
 
-
     app = wxPySimpleApp()
     frame = TestFrame()
-    frame.Show(true)
+    frame.Show(True)
     app.MainLoop()