Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 71061
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T19:49:43+00:00 2026-05-10T19:49:43+00:00

I’m making a program that fits the wizard concept ideally; the user is walked

  • 0

I’m making a program that fits the wizard concept ideally; the user is walked through the steps to create a character for a game.

However, I’m realizing that the limitations of the wizard are making it difficult to design ‘elegant’ logic flow. For example, because all pages of the wizard are initalized at the same time, I can’t have the values entered in one page available to the next one. I have to put a button on each page to get the values from a previous page rather than simply having fields auto-populated.

I’ve thought about alternatives to using the wizard. I think the best idea is to have some buttons on one panel that change the information on another panel, e.g. a splitter window.

However, I can’t find any documentation in wxPython on how to dynamically change the panel. Everything I’ve found so far is really pretty static, hence the use of the wizard. Even the ‘wxPython in Action’ book doesn’t mention it.

Are there any tutorials for making ‘dynamic panels’ or better management of a wizard?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-10T19:49:44+00:00Added an answer on May 10, 2026 at 7:49 pm

    Here is a simple example. This way you can make your ‘wizard’ work like a finite state machine where states are different pages that are initialized on demand. Also, the data is shared between pages.

    import wx import wx.lib.newevent   (PageChangeEvent, EVT_PAGE_CHANGE) = wx.lib.newevent.NewEvent()   class Data:     foo = None     bar = None   class Page1(wx.Panel):     def __init__(self, parent, data):         wx.Panel.__init__(self, parent)         self.parent = parent         self.data = data          sizer = wx.BoxSizer(wx.VERTICAL)         self.SetSizer(sizer)         label = wx.StaticText(self, label='Page 1 - foo')         self.foo = wx.TextCtrl(self)         goto_page2 = wx.Button(self, label='Go to page 2')          for c in (label, self.foo, goto_page2):             sizer.Add(c, 0, wx.TOP, 5)          goto_page2.Bind(wx.EVT_BUTTON, self.OnPage2)      def OnPage2(self, event):         self.data.foo = self.foo.Value         wx.PostEvent(self.parent, PageChangeEvent(page=Page2))   class Page2(wx.Panel):     def __init__(self, parent, data):         wx.Panel.__init__(self, parent)         self.parent = parent         self.data = data          sizer = wx.BoxSizer(wx.VERTICAL)         self.SetSizer(sizer)         label = wx.StaticText(self, label='Page 2 - bar')         self.bar = wx.TextCtrl(self)         goto_finish = wx.Button(self, label='Finish')          for c in (label, self.bar, goto_finish):             sizer.Add(c, 0, wx.TOP, 5)          goto_finish.Bind(wx.EVT_BUTTON, self.OnFinish)      def OnFinish(self, event):         self.data.bar = self.bar.Value         wx.PostEvent(self.parent, PageChangeEvent(page=finish))   def finish(parent, data):     wx.MessageBox('foo = %s\nbar = %s' % (data.foo, data.bar))     wx.GetApp().ExitMainLoop()   class Test(wx.Frame):     def __init__(self):         wx.Frame.__init__(self, None)         self.data = Data()         self.current_page = None          self.Bind(EVT_PAGE_CHANGE, self.OnPageChange)         wx.PostEvent(self, PageChangeEvent(page=Page1))      def OnPageChange(self, event):         page = event.page(self, self.data)         if page == None:             return         if self.current_page:             self.current_page.Destroy()         self.current_page = page         page.Layout()         page.Fit()         page.Refresh()   app = wx.PySimpleApp() app.TopWindow = Test() app.TopWindow.Show() app.MainLoop() 
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 67k
  • Answers 67k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • added an answer It's not redundant. Suppose an exception is thrown during your… May 11, 2026 at 11:55 am
  • added an answer Windows->Close All Documents File->Exit or manually delete the .sou file… May 11, 2026 at 11:55 am
  • added an answer Check out the drag and drop section of the Java… May 11, 2026 at 11:55 am

Related Questions

I keep getting tasks that are above my skill level. How can I address this without coming accross as grossly incompetent?
I have a web-service that I will be deploying to dev, staging and production.
I'm thinking of starting a wiki, probably on a low cost LAMP hosting account.
I have the following tables in my database that have a many-to-many relationship, which
I'm using the RESTful authentication Rails plugin for an app I'm developing. I'm having
I recently printed out Jeff Atwood's Understanding The Hardware blog post and plan on
I find that getting Unicode support in my cross-platform apps a real pain in
I would like to test a string containing a path to a file for
I'm getting this problem: PHP Warning: mail() [function.mail]: SMTP server response: 550 5.7.1 Unable
I'm an Information Architect and JavaScript developer by trade nowadays, but recently I've been

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.