Better Back button handling

Wizard for Windows Forms Forum

Posted 19 years ago by William
Avatar
It's rather a hassle to have to hand-code all the necessary logic to handle the "Back" button in a scenario where there are several different paths through the Wizard.

E.g., when a user clicks Back from page C, you have to write code that goes back to either A or B, depending on where the user came from.

I've ended up subclassing to add a page stack and various navigation method and event overrides so that this can be handled automatically. It would be nice if something like this were built in to the control.

Comments (6)

Posted 19 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hi William,

We're actually working on a new release of Wizard right now so this is an excellent time to discuss it.

How would you envision this working, like add a flag that says either go through steps sequentially or via a stack of visited pages? The stack version would store the pages that you go to and when you press Back, it would just pop those off?


Actipro Software Support

Posted 19 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
An update... this is now implemented for the next major Wizard release.


Actipro Software Support

Posted 19 years ago by amadrias
Avatar
When will it be released and what about licensing?
Posted 19 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Actually we've got everything almost done however there is an issue with the designer not serializing to code (in InitializeComponent) some property settings that are made while in the designer. These are for the new rendering features that allow for easy setup of gradient backgrounds, etc. Once we sort that out then Wizard will be almost ready for pre-release.


Actipro Software Support

Posted 19 years ago by William
Avatar
Sorry I'm just getting back to you--I forgot I had posted the message.

The way I implemented this was to create ny own form class the inherits WizardForm and keeps track of the actual page sequence (by overriding OnAfterPageSelect) using a stack. It then overrides OnBackButtonClick to pop the last page off the stack instead of using the sequence.

So yes, the option you described would work, but I don't see why you would ever want to use the page sequence rather than the stack--I can't think of a scenario where it would be appropriate for the Back button to go to a page other than the page the user was previously on.
Posted 19 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
William, if you would like to help us test the 3.0 pre-release, please send us an email.


Actipro Software Support

The latest build of this product (v24.1.0) was released 1 month ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.