]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/demo/Wizard.py
removed code inside USE_SIZABLE_CALENDAR, we should allow making the main calendar...
[wxWidgets.git] / wxPython / demo / Wizard.py
index 697fe9c2d041dd487fb24433e20f8860ff8ee39f..233f172d86b43a288a0486bab685c104a44b8428 100644 (file)
@@ -10,8 +10,8 @@ def makePageTitle(wizPg, title):
     wizPg.SetSizer(sizer)
     title = wx.StaticText(wizPg, -1, title)
     title.SetFont(wx.Font(18, wx.SWISS, wx.NORMAL, wx.BOLD))
     wizPg.SetSizer(sizer)
     title = wx.StaticText(wizPg, -1, title)
     title.SetFont(wx.Font(18, wx.SWISS, wx.NORMAL, wx.BOLD))
-    sizer.AddWindow(title, 0, wx.ALIGN_CENTRE|wx.ALL, 5)
-    sizer.AddWindow(wx.StaticLine(wizPg, -1), 0, wx.EXPAND|wx.ALL, 5)
+    sizer.Add(title, 0, wx.ALIGN_CENTRE|wx.ALL, 5)
+    sizer.Add(wx.StaticLine(wizPg, -1), 0, wx.EXPAND|wx.ALL, 5)
     return sizer
 
 #----------------------------------------------------------------------
     return sizer
 
 #----------------------------------------------------------------------
@@ -136,6 +136,7 @@ class TestPanel(wx.Panel):
             wx.MessageBox("Cancelling on the first page has been prevented.", "Sorry")
             evt.Veto()
 
             wx.MessageBox("Cancelling on the first page has been prevented.", "Sorry")
             evt.Veto()
 
+
     def OnWizFinished(self, evt):
         self.log.write("OnWizFinished\n")
         
     def OnWizFinished(self, evt):
         self.log.write("OnWizFinished\n")
         
@@ -162,6 +163,7 @@ wxWizardPageSimple class can easily be used for the pages."""))
         wiz.WizardPageSimple_Chain(page2, page3)
         wiz.WizardPageSimple_Chain(page3, page4)
 
         wiz.WizardPageSimple_Chain(page2, page3)
         wiz.WizardPageSimple_Chain(page3, page4)
 
+        wizard.GetPageAreaSizer().Add(page1)
         if wizard.RunWizard(page1):
             wx.MessageBox("Wizard completed successfully", "That's all folks!")
         else:
         if wizard.RunWizard(page1):
             wx.MessageBox("Wizard completed successfully", "That's all folks!")
         else:
@@ -175,7 +177,7 @@ wxWizardPageSimple class can easily be used for the pages."""))
         #wizard.SetExtraStyle(wx.WIZARD_EX_HELPBUTTON)
         #wizard.Create(self, self.ID_wiz, "Simple Wizard",
         #              images.getWizTest1Bitmap())
         #wizard.SetExtraStyle(wx.WIZARD_EX_HELPBUTTON)
         #wizard.Create(self, self.ID_wiz, "Simple Wizard",
         #              images.getWizTest1Bitmap())
-        wizard = wiz.Wizard(self, -1, "Simple Wizard", images.getWizTest1Bitmap())
+        wizard = wiz.Wizard(self, -1, "Dynamic Wizard", images.getWizTest1Bitmap())
 
         page1 = TitledPage(wizard, "Page 1")
         page2 = SkipNextPage(wizard, "Page 2")
 
         page1 = TitledPage(wizard, "Page 1")
         page2 = SkipNextPage(wizard, "Page 2")
@@ -202,6 +204,7 @@ of the pages and also which bitmap is shown.
         page5.SetPrev(page4)
 
 
         page5.SetPrev(page4)
 
 
+        wizard.GetPageAreaSizer().Add(page1)
         if wizard.RunWizard(page1):
             wx.MessageBox("Wizard completed successfully", "That's all folks!")
         else:
         if wizard.RunWizard(page1):
             wx.MessageBox("Wizard completed successfully", "That's all folks!")
         else:
@@ -237,5 +240,5 @@ it is important to keep them as simple as possible.
 if __name__ == '__main__':
     import sys,os
     import run
 if __name__ == '__main__':
     import sys,os
     import run
-    run.main(['', os.path.basename(sys.argv[0])])
+    run.main(['', os.path.basename(sys.argv[0])] + sys.argv[1:])