def OnRunSimpleWizard(self, evt): # Create the wizard and the pages wizard = wiz.Wizard(self, -1, "Simple Wizard", images.getWizTest1Bitmap()) page1 = TitledPage(wizard, "Page 1") page2 = TitledPage(wizard, "Page 2") page3 = TitledPage(wizard, "Page 3") page4 = TitledPage(wizard, "Page 4") self.page1 = page1 page1.sizer.Add( wx.StaticText( page1, -1, """ This wizard is totally useless, but is meant to show how to chain simple wizard pages together in a non-dynamic manner. IOW, the order of the pages never changes, and so the wxWizardPageSimple class can easily be used for the pages.""", ) ) wizard.FitToPage(page1) page4.sizer.Add(wx.StaticText(page4, -1, "\nThis is the last page.")) # Use the convenience Chain function to connect the pages wiz.WizardPageSimple_Chain(page1, page2) wiz.WizardPageSimple_Chain(page2, page3) wiz.WizardPageSimple_Chain(page3, page4) if wizard.RunWizard(page1): wx.MessageBox("Wizard completed successfully", "That's all folks!") else: wx.MessageBox("Wizard was cancelled", "That's all folks!")
def OnRunSimpleWizard(self, evt): # Create the wizard and the pages wizard = wiz.Wizard(self, -1, "Simple Wizard", images.getWizTest1Bitmap()) page1 = TitledPage(wizard, "Page 1") page2 = TitledPage(wizard, "Page 2") page3 = TitledPage(wizard, "Page 3") page4 = TitledPage(wizard, "Page 4") self.page1 = page1 page1.sizer.Add( wx.StaticText( page1, -1, """ This wizard is totally useless, but is meant to show how to chain simple wizard pages together in a non-dynamic manner. IOW, the order of the pages never changes, and so the wxWizardPageSimple class can easily be used for the pages.""")) wizard.FitToPage(page1) page4.sizer.Add(wx.StaticText(page4, -1, "\nThis is the last page.")) # Use the convenience Chain function to connect the pages wiz.WizardPageSimple_Chain(page1, page2) 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: wx.MessageBox("Wizard was cancelled", "That's all folks!")
def OnRunDynamicWizard(self, evt): # Create the wizard and the pages # wizard = wx.PreWizard() # 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()) page1 = TitledPage(wizard, "Page 1") page2 = SkipNextPage(wizard, "Page 2") page3 = TitledPage(wizard, "Page 3") page4 = UseAltBitmapPage(wizard, "Page 4") page5 = TitledPage(wizard, "Page 5") self.page1 = page1 page1.sizer.Add( wx.StaticText( page1, -1, """ This wizard shows the ability to choose at runtime the order of the pages and also which bitmap is shown. """, ) ) wizard.FitToPage(page1) page5.sizer.Add(wx.StaticText(page5, -1, "\nThis is the last page.")) # Set the initial order of the pages page1.SetNext(page2) page2.SetPrev(page1) page2.SetNext(page3) page3.SetPrev(page2) page3.SetNext(page4) page4.SetPrev(page3) page4.SetNext(page5) page5.SetPrev(page4) if wizard.RunWizard(page1): wx.MessageBox("Wizard completed successfully", "That's all folks!") else: wx.MessageBox("Wizard was cancelled", "That's all folks!")
def OnRunDynamicWizard(self, evt): # Create the wizard and the pages #wizard = wx.PreWizard() #wizard.SetExtraStyle(wx.WIZARD_EX_HELPBUTTON) #wizard.Create(self, self.ID_wiz, "Simple Wizard", # images.getWizTest1Bitmap()) wizard = wiz.Wizard(self, -1, "Dynamic Wizard", images.getWizTest1Bitmap()) page1 = TitledPage(wizard, "Page 1") page2 = SkipNextPage(wizard, "Page 2") page3 = TitledPage(wizard, "Page 3") page4 = UseAltBitmapPage(wizard, "Page 4") page5 = TitledPage(wizard, "Page 5") self.page1 = page1 page1.sizer.Add( wx.StaticText( page1, -1, """ This wizard shows the ability to choose at runtime the order of the pages and also which bitmap is shown. """)) wizard.FitToPage(page1) page5.sizer.Add(wx.StaticText(page5, -1, "\nThis is the last page.")) # Set the initial order of the pages page1.SetNext(page2) page2.SetPrev(page1) page2.SetNext(page3) page3.SetPrev(page2) page3.SetNext(page4) page4.SetPrev(page3) page4.SetNext(page5) page5.SetPrev(page4) wizard.GetPageAreaSizer().Add(page1) if wizard.RunWizard(page1): wx.MessageBox("Wizard completed successfully", "That's all folks!") else: wx.MessageBox("Wizard was cancelled", "That's all folks!")