go to next page with out user clicking next

Wizard for Windows Forms Forum

Posted 14 years ago by Jeremy Wesley
Avatar
I would like to programatically go to the next page with out the user clicking the next button. I tried the PerformNextButtonClick but that didn't work. I have tried Moveto, that didn't work either.

So how do you do it?

Comments (4)

Posted 14 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hi Jeremy,

It will only work that way if the Next button is enabled when you execute that method. Is it? Also, if it is, you could be cancelling the switch in the NextButtonClick event.

Another way to do it is increment the Wizard.SelectedIndex property.


Actipro Software Support

Posted 14 years ago by Jeremy Wesley
Avatar
The next button is disabled, but i enable it right before i want it to go to the next page.

Here is my code.

<I have to validate a login to another application here, once that is done I just want to go to the next page "wizardOptions" >

wizardActLogin.NextButtonEnabled=ActiproSoftware.Wizard.WizardButtonEnabledDefault.True;
this.wizard1.SelectedPage = this.wizardOptions;
wizard1.SelectedIndex++;

wizard1.SelectedIndex++; Didnt work either.
Posted 14 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
I think somewhere you are cancelling the page change, in one of the event handlers. I just tested all these methods and they work fine.

For instance, open our sample project and change this event handler:
private void infoWebSiteLabel_LinkClicked(object sender, System.Windows.Forms.LinkLabelLinkClickedEventArgs e) {
    //    System.Diagnostics.Process.Start(((LinkLabel)sender).Text);
    this.Wizard.PerformNextButtonClick();
}
The run the sample and click the web site link on the Welcome page. It will change pages fine. That works and it also works if I replace the PerformNextButtonClick with SelectedIndex++.

Look through the various event handlers in your app because you are either cancelling the page change or forcing it to another page.


Actipro Software Support

Posted 14 years ago by Jeremy Wesley
Avatar
ah it was my bad, I had two routes of code and i had been changing the less likly route when testing..
The latest build of this product (v2018.1 build 0341) was released 6 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.