[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[news.eclipse.tools] Re: Wizard, WizardDialog, WizardPage

The WizardDialog class is responsible for calling the Wizard.addPages
method.
After calling the Wizard.addPages method the WizardDialog class calls the
Wizard.createPageControls method which in turn calls the createControls
method on all your wizard pages.  The WizardDialog does this so that it can
properly resize itself to accommodate all your pages.
However, if you would like to defer the call to your WizardPages
createControls methods then you can override your Wizard's
createPageControls method so that it does nothing, like so...
    public void createPageControls(Composite pageContainer) { }
In this case the call to your WizardPage's createControls(...) method will
be deferred until the page must actually be displayed.

One drawback to doing this is that the WizardDialog may not be able to
properly resize itself to accommodate all your wizard pages until the pages
are displayed.


"Matthew Hartley" <mhartley@xxxxxxxxxx> wrote in message
news:9nlv21$e4t$1@xxxxxxxxxxxxxxxx
> Hi!
>
> I currently have one page added for my wizard, and would like to add two
> more, but those two remaining pages must use variables at runtime in order
> to display the controls on the page (the controls on these two pages can
> not be static, they must be dynamic at runtime).  The problem I am running
> into is that I would like to add a second page to my wizard when the user
> presses the next button, but in order to have the next button enabled on
> the first page, the wizard must already know about having a second page,
> this doesn't help me if I want to have a second page that gets created
> dynamically.
>
> Any ideas on how to re-set the controls on a page if they have already
> been created by "addPages".  Or, any way to enable the next button, even
> if only one page has been currently added to the wizard.  Please note: the
> method setForcePreviousAndNextButtons() does not help me, this only
> displays the previous and next buttons, not enable them!
> Please help
>
> Thanks
>