#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2005
    Location
    Raleigh NC
    Posts
    89
    Rep Power
    10

    wxpython issues again..


    Ok well this is my first attempt at gui programming with python or any language for that matter. I am trying to stick with the wx windows modules so please no suggestions like switch to gtk or w/e. anyway the problem is that this application is supposed to be a wizard with multiple steps however the wizard code that I have found online as a sample limits me to only 2 pages. I have tried to add a third page but I cannot find in the code what defines the limit of 2 pages. so without further ado the code is

    Code:
    import wx
    import wx.wizard as wiz
    
    def makePageTitle(wizPg, title):
    	sizer = wx.BoxSizer(wx.VERTICAL)
    	wizPg.SetSizer(sizer)
    	title = wx.StaticText(wizPg, -1, title)
    	title.SetFont(wx.Font(12, 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)
    	return sizer
    
    class TitledPage(wiz.WizardPageSimple):
    	def __init__(self, parent, title):
    		wiz.WizardPageSimple.__init__(self, parent)
    		self.sizer = makePageTitle(self, title)
    
    app = wx.PySimpleApp()
    wizard = wiz.Wizard(None, -1, "IntegriTRACK")
    page1 = TitledPage(wizard, "Select Export File")
    page2 = TitledPage(wizard, "Select Previous SVN Number")
    page3 = TitledPage(wizard, "Select Current SVN Number")
    wiz.WizardPageSimple_Chain(page1, page2, page3)
    wizard.FitToPage(page1)
    wizard.RunWizard(page1)
    wizard.Destroy()
    app.MainLoop()
  2. #2
  3. Contributing User
    Devshed Intermediate (1500 - 1999 posts)

    Join Date
    Dec 2004
    Location
    Meriden, Connecticut
    Posts
    1,797
    Rep Power
    154
    I've never actually used WizardPages with wxPython, have you checked the official wxPython documents and samples for more help on this? Maybe they have a better example.

IMN logo majestic logo threadwatch logo seochat tools logo