]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/demo/wxDialog.py
correct typemap type
[wxWidgets.git] / wxPython / demo / wxDialog.py
index 615539add39febc81563d4f9dab4f42f175cb7c9..9d8272a7e4fc316932e0bc6e775f118e5d997000 100644 (file)
@@ -1,6 +1,6 @@
 
 from wxPython.wx import *
-from wxPython.help import *
+##from wxPython.help import *
 
 #---------------------------------------------------------------------------
 # Create and set a help provider.  Normally you would do this in
@@ -18,7 +18,7 @@ class TestDialog(wxDialog):
                  style=wxDEFAULT_DIALOG_STYLE):
 
         # Instead of calling wxDialog.__init__ we precreate the dialog
-        # so we can set an extra style that must be set before
+        # object so we can set an extra style that must be set before
         # creation, and then we create the GUI dialog using the Create
         # method.
         pre = wxPreDialog()
@@ -28,8 +28,7 @@ class TestDialog(wxDialog):
         # This next step is the most important, it turns this Python
         # object into the real wrapper of the dialog (instead of pre)
         # as far as the wxPython extension is concerned.
-        self.this = pre.this
-
+        self.PostCreate(pre)
 
         # Now continue with the normal construction of the dialog
         # contents
@@ -81,7 +80,7 @@ class TestDialog(wxDialog):
         btn.SetHelpText("The Cancel button cnacels the dialog. (Duh!)")
         box.Add(btn, 0, wxALIGN_CENTRE|wxALL, 5)
 
-        sizer.AddSizer(box, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5)
+        sizer.Add(box, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5)
 
         self.SetSizer(sizer)
         self.SetAutoLayout(True)
@@ -102,7 +101,7 @@ def runTest(frame, nb, log):
         log.WriteText("You pressed OK\n")
     else:
         log.WriteText("You pressed Cancel\n")
-
+    win.Destroy()
 
 
 #---------------------------------------------------------------------------