StrataFrame Forum

How to update wizard after new pages added

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

By Greg McGuffey - 11/21/2006

I have a wizard that has only a single page at design time, then I add a bunch at runtime (all of which is working great). The only hick-up is that the when the wizard is initially shown, there are only three buttons for the wizard: back (disabled), finish (enabled) and Cancel (enabled). I'm using a tree view as a second navigation control and when I move to any other page then back to the first page, the buttons are then correct (back, next and cancel all disabled/enabled correctly). So the question is how do I update the wizard so it updates the controls after adding pages in code? I tried Refresh and Update but neither worked.
By Greg McGuffey - 11/21/2006

sigh...this is supposed to be in the Winforms forum. I'm going to post it there...this one can be deleted; it's not an enhancement request Blush
By Trent L. Taylor - 11/21/2006

Just manually set the button status.  There are a lot of factors as to how to control the state of buttons...but you can always overwrite any native behavior by simply setting the button status:

Me.MyWizard.SetNavigationButtonStatus(StrataFrame.UI.WizardNavigationButtons.Next,StrataFrame.UI.WizardNavigationButtonStatus.Enabled)