| | | StrataFrame VIP
       
Group: StrataFrame Users Last Login: Yesterday @ 12:10:08 PM Posts: 1,327, Visits: 3,471 |
| 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 is no next button only a finish button. The buttons shown are: back (disabled), finish (enabled) and Cancel (enabled). This is correct for a wizard with one page (as it is in design mode).
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. |
| | | | 
StrataFrame Developer

Group: StrataFrame Developers Last Login: Yesterday @ 4:50:35 PM Posts: 4,796, Visits: 4,766 |
| | 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) |
| | | | StrataFrame VIP
       
Group: StrataFrame Users Last Login: Yesterday @ 12:10:08 PM Posts: 1,327, Visits: 3,471 |
| Thanks! I also had to hide the finish button and show the next button so my code looked like:
Me.MyWizard.cmdFinish.Navigation.Visible = False Me.MyWizard.Navigation.cmdNext.Visible = True Me.MyWizard.SetNavigationButtonStatus(StrataFrame.UI.WizardNavigationButtons.Next,StrataFrame.UI.WizardNavigationButtonStatus.Enabled) |
| | | | 
StrataFrame Developer

Group: StrataFrame Developers Last Login: Yesterday @ 4:50:35 PM Posts: 4,796, Visits: 4,766 |
| | One thing you can do here is set the Navigation type of a page to FinishPage. This will force the page to be a Finish page rather than just being the last page in the collection. |
| | | | StrataFrame VIP
       
Group: StrataFrame Users Last Login: Yesterday @ 12:10:08 PM Posts: 1,327, Visits: 3,471 |
| | I'll have to get to that soon, but the problem I was having was that I had a single page defined at run time, so I'm guessing that the wizard automatically made it the finish page. When I showed the wizard, I added a bunch of pages (50+), but the first page was likely still marked as being the finish page....hmmm...so maybe I can either set the navigation type of the first page to normal. Also, can there only be one finish page? (then setting another would clear the first page, right?) |
| | | | 
StrataFrame Developer

Group: StrataFrame Developers Last Login: Yesterday @ 4:50:35 PM Posts: 4,796, Visits: 4,766 |
| | You can have as many Finish pages as you want. Which only makes sense in the event that you have different endings based on what pages are selected within the wizard. But by default, all pages NavigationType is Automatic, so only the last page will be a Finish page. |
| |
|
|