[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Disable "Finish" button in wizardpage

Then as Simon says check to make sure your canFinish is being called.

Bob

"Sang" <sangl@xxxxxxxxx> wrote in message news:ajbe2l$74p$1@xxxxxxxxxxxxxxxx
> I only want the \"Finish\" button to be enabled at the very last
> wizard-page. However, if I call setPageComplete(true) to enable the
> \"Finish\" button and press button \"Back\", then the \"Finish\" button is
> enabled and the user can exit the wizard in the middle of the process.
> This is not what I intend to do.  I only allow the user to exit the wizard
> when all the required steps are properly carried out.
>
> Sang wrote:
>
> > Return false in canFinish() does not dim out/disable the Finish button.
> > Anything that I may have missed?
>
> > Bob Foster wrote:
>
> > > If you look at existing pages, you will see that many of them are
> structured
> > > as follows:
>
> > > A single \"validate\" method checks the values of all fields in the
page,
> > > produces messages about them and calls setPageComplete(). Validate is
> called
> > > at the end of createControl() and at the end of any listener action.
(Since
> > > it is bad UI to show an error message when the user initially visits a
> page,
> > > createControl() clears messages after calling validate.) Thus, Finish
and
> > > Next are never enabled unless the page is valid.
>
> > > There can be exceptions to this behavior, e.g., if there are two
fields in
> > > an error state it is best to complain about the one the user just
changed,
> > > but in general this is a tried-and-true technique.
>
> > > Bob
>
> > > \"Simon Arsenault\" <simon_arsenault@xxxxxxxxxxxxxx> wrote in message
> > > news:aj0qqk$tm2$1@xxxxxxxxxxxxxxxx
> > > > IWizard.canFinish()
> > > >
> > > > Look at the implementation for Wizard.canFinish()  It asks each page
> > > > isPageComplete() and if so, returns true. You can override this
method or
> > > > make sure you pages return false for isPageComplete() until the user
has
> > > > entered the correct information.
> > > >
> > > > Simon :-)
> > > >
> > > > \"Sang\" <j_sklam@xxxxxxxxxxx> wrote in message
> > > > news:aj0qfp$tgb$1@xxxxxxxxxxxxxxxx
> > > > > Does anyone know how to disable the \"Finish\" button in a
wizardpage?
> > > > > I do not want the user from existing the wizard dialog without
> > > > > completing the steps required.  Thanks
> > > > >
> > > > >
> > > >
> > > >
>
>
>
>
>
>
>
>