]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/demo/ActiveXWrapper_IE.py
removed second parameter from GetFirstChild calls
[wxWidgets.git] / wxPython / demo / ActiveXWrapper_IE.py
index 001455286ab1325996f233f481a73fa4c1fd0f14..fd164e5761449b8a144ef841c6c7d82262e74c00 100644 (file)
@@ -11,7 +11,7 @@ you can use just like wxWindow, (set the size and position, use in a
 sizer, etc.) except its contents will be the COM control.
 
 <p>
-This demo embeds the Internet Exploer WebBrowser control, and shows
+This demo embeds the Internet Explorer WebBrowser control, and shows
 how to receive events from the COM control.  (The title bar and status
 bar are updated as pages change, in addition to the log messages being
 shown.)
@@ -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()