[wxPython-users] Re: Changing next page on wx.wizard.Wizard
Robin Dunn
robin at alldunn.com
Thu Sep 27 15:04:09 PDT 2007
Craig Douglas wrote:
> Robin Dunn <robin <at> alldunn.com> writes:
>
>> Craig Douglas wrote:
>>> I have a handler bound to wiz.EVT_WIZARD_PAGE_CHANGING which should
>>> change the next page depending upon a control value selected on the
>>> current page. So what I do is:
>>>
>>>
>>>
>>> cur_page.set_next(desired_page)
>> That should probably be
>>
>> cur_page.SetNext(desired_page)
>>
>
>
> When I do that I get an attribute error saying the page has no attribute
> SetNext.
Sorry, I was looking at WizardPageSimple... I'm still not sure where
set_next is coming from. There isn't one in the wxPython classes, so I
don't know what it is doing.
>
> I've used .set_next() fine to set the initial order of each page (each page is
> derived from wx.wizard.PyWizardPage) and can change the next page normally,
> but not while handling a .EVT_WIZARD_PAGE_CHANGING event.
Anyway, if you're using PyWizardPage then you can override GetPage and
the wizard will call it when it wants to know what the next page should
be. You can make it check and do whatever you need.
--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!
More information about the wxpython-users
mailing list