wxWizard - change page via code? Topic is solved

If you are using the main C++ distribution of wxWidgets, Feel free to ask any question related to wxWidgets development here. This means questions regarding to C++ and wxWidgets, not compile problems.
Post Reply
cozmotion
Earned a small fee
Earned a small fee
Posts: 14
Joined: Thu Oct 22, 2009 10:37 pm

wxWizard - change page via code?

Post by cozmotion »

Is there a way to change to any given page in a wxWizard?
JimFairway
wxWorld Domination!
wxWorld Domination!
Posts: 1059
Joined: Sun Dec 30, 2007 6:40 pm
Location: Canada

Post by JimFairway »

Hi,

Not sure why it's not in the documentation, but you should be able to call wxWizard::ShowPage (see wizard.h in wx/include/wx/generic)
Snippet below:

Code: Select all

    // show the prev/next page, but call TransferDataFromWindow on the current
    // page first and return false without changing the page if
    // TransferDataFromWindow() returns false - otherwise, returns true
    bool ShowPage(wxWizardPage *page, bool goingForward = true);
Hope that helps,

Jim
OS: Vista SP1, wxWidgets 2.8.7.
cozmotion
Earned a small fee
Earned a small fee
Posts: 14
Joined: Thu Oct 22, 2009 10:37 pm

Post by cozmotion »

It does - Thanks!
Post Reply