StrataFrame Forum
Home      Members   Calendar   Who's On
Welcome Guest ( Login | Register )
      



How to update a wizard after adding pages in...Expand / Collapse
Author
Message
Posted 11/21/2006 6:43:02 PM
StrataFrame VIP

StrataFrame VIPStrataFrame VIPStrataFrame VIPStrataFrame VIPStrataFrame VIPStrataFrame VIPStrataFrame VIPStrataFrame 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.
Post #4718
Posted 11/21/2006 7:03:40 PM


StrataFrame Developer

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)
Post #4721
Posted 11/21/2006 10:39:12 PM
StrataFrame VIP

StrataFrame VIPStrataFrame VIPStrataFrame VIPStrataFrame VIPStrataFrame VIPStrataFrame VIPStrataFrame VIPStrataFrame 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)
Post #4729
Posted 11/22/2006 12:25:30 PM


StrataFrame Developer

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.
Post #4736
Posted 11/22/2006 1:02:59 PM
StrataFrame VIP

StrataFrame VIPStrataFrame VIPStrataFrame VIPStrataFrame VIPStrataFrame VIPStrataFrame VIPStrataFrame VIPStrataFrame 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?)
Post #4738
Posted 11/22/2006 1:12:51 PM


StrataFrame Developer

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.
Post #4740
« Prev Topic | Next Topic »


Reading This TopicExpand / Collapse
Active Users: 0 (0 guests, 0 members, 0 anonymous members)
No members currently viewing this topic.
Forum Moderators: Ben Chase, Trent L. Taylor, Steve L. Taylor

PermissionsExpand / Collapse

All times are GMT -6:00, Time now is 6:42am

Powered by InstantForum.NET v4.1.4 © 2008
Execution: 0.125. 9 queries. Compression Enabled.
Site Map - Home - My Account - Forum - About Us - Contact Us - Try It - Buy It

Microsoft, Visual Studio, and the Visual Studio logo are trademarks or registered trademarks of Microsoft Corporation in the United States and/or other countries.