StrataFrame Forum

Programmatically navigating Wizard control

http://forum.strataframe.net/Topic4016.aspx

By Greg McGuffey - 10/31/2006

I am trying to navigate to a page in the wizard control via code. I've tried:



wizardControl.PageCollection.Item("somePage").visible = true

wizardControl.PageCollection.Item("somePage").Show()



Neither worked. How can I do this?



Thanks!
By Greg McGuffey - 10/31/2006

I figured it out in the Object Browser.



SetActivePage()



That was easy. BigGrin



However, could you explain how the Deleg_xxxClicked and why they would be used instead of just the normal clicked events?
By Trent L. Taylor - 10/31/2006

There is no need for you to use the delegates directly.  If you are not familiar with a delegate, it is basically an emissary between two different process or threads.  Any of our events that may have potential interaction with objects on another thread use the delegate...which is what you saw here.  This allows us to Invoke off of a synchronizing thread which will prevent illegal cross thread violations.

Just calling the RaiseEvent method will lead to bad mojo BigGrin when threads or other delegates are involved...so it is always best to create events that talk "outside" of itself to talk through a delegate and invoke off of a synchronizing object.

Also, you can just set the CurrentPage of the wizard control as well:

MyWizardControl.CurrentPage = MyWizardPage

By Greg McGuffey - 11/1/2006

Thanks for the information. I later saw the CurrentPage() also. Basically one can set the current page via an index, the page name or via a page object. Nice.
By Trent L. Taylor - 11/1/2006

You got it! Smile