Disable finish button in multi-page wizard [message #222395] |
Tue, 06 April 2004 10:27 |
Eclipse User |
|
|
|
Originally posted by: dominikschadow.web.de
Hello.
How can I disable the finish button in a multi-page wizard on the FIRST
page? Both pages must be completed, before it should be possible to
finish the wizard.
Thanks Dominik
|
|
|
Re: Disable finish button in multi-page wizard [message #222439 is a reply to message #222395] |
Tue, 06 April 2004 11:17 |
Eclipse User |
|
|
|
Originally posted by: sagivijay.yahoo.com
Hi,
You will have to do this in the setPageComplete method.
If this is set to true then the finish button will be enabled. Else it
wont.
Hope this helps.
Vijay
exquisitus wrote:
> Hello.
> How can I disable the finish button in a multi-page wizard on the FIRST
> page? Both pages must be completed, before it should be possible to
> finish the wizard.
> Thanks Dominik
|
|
|
Re: Disable finish button in multi-page wizard [message #222826 is a reply to message #222439] |
Tue, 06 April 2004 14:14 |
Eclipse User |
|
|
|
Originally posted by: dominikschadow.web.de
Hi.
Not exactly. Setting setPageComplete to false disables the finish
button, but as well the next button. But this next button is needed. On
the first page of the wizard, only the next and the cancel button should
be enabled. Back button is of course automatically disabled. I need a
flag or method to disable the finish button on this page as well. Any ideas?
Thanks Dominik
Vijay schrieb:
> Hi,
> You will have to do this in the setPageComplete method.
> If this is set to true then the finish button will be enabled. Else it
> wont.
> Hope this helps.
> Vijay
> exquisitus wrote:
>
>
>>Hello.
>
>
>>How can I disable the finish button in a multi-page wizard on the FIRST
>>page? Both pages must be completed, before it should be possible to
>>finish the wizard.
>
>
>>Thanks Dominik
>
>
>
|
|
|
Re: Disable finish button in multi-page wizard [message #223428 is a reply to message #222826] |
Wed, 07 April 2004 08:32 |
Eclipse User |
|
|
|
Originally posted by: sagivijay.yahoo.com
Hi, You will have to then do this by overriding the canFinish method of
Wizard
For Eg. I have two pages in my wizard and I want the finish button to be
disabled in the first page. This is how I would do it.
class MyWizardPage extends WizardPage
class MyWizard extends Wizard
{
MyWizardPage page1,page2;
public void addPages()
{
page1 = new MyWizardPage();
addPage(page1);
page2 = new MyWizardPage();
addPAge(page2)
}
public boolean canFinish()
{
if(getContainer().getCurrentPage() == page1)
return false;
else
return true;
}
}
The next button would however be enabled/disabled based on what
canFlipToNextPage() method in the WizardPage returns.
Hope this is what you want.
Vijay
exquisitus wrote:
> Hi.
> Not exactly. Setting setPageComplete to false disables the finish
> button, but as well the next button. But this next button is needed. On
> the first page of the wizard, only the next and the cancel button should
> be enabled. Back button is of course automatically disabled. I need a
> flag or method to disable the finish button on this page as well. Any ideas?
> Thanks Dominik
> Vijay schrieb:
> > Hi,
> > You will have to do this in the setPageComplete method.
> > If this is set to true then the finish button will be enabled. Else it
> > wont.
> > Hope this helps.
> > Vijay
> > exquisitus wrote:
> >
> >
> >>Hello.
> >
> >
> >>How can I disable the finish button in a multi-page wizard on the FIRST
> >>page? Both pages must be completed, before it should be possible to
> >>finish the wizard.
> >
> >
> >>Thanks Dominik
> >
> >
> >
|
|
|
Re: Disable finish button in multi-page wizard [message #223484 is a reply to message #223428] |
Wed, 07 April 2004 11:12 |
Eclipse User |
|
|
|
Originally posted by: dominikschadow.web.de
Hi Vijay. Thanks a lot, that worked!
Vijay schrieb:
> Hi, You will have to then do this by overriding the canFinish method of
> Wizard
> For Eg. I have two pages in my wizard and I want the finish button to be
> disabled in the first page. This is how I would do it.
>
> class MyWizardPage extends WizardPage
>
> class MyWizard extends Wizard
> {
> MyWizardPage page1,page2;
>
> public void addPages()
> {
> page1 = new MyWizardPage();
> addPage(page1);
> page2 = new MyWizardPage();
> addPAge(page2)
> }
>
> public boolean canFinish()
> {
> if(getContainer().getCurrentPage() == page1)
> return false;
> else
> return true;
> }
> }
>
> The next button would however be enabled/disabled based on what
> canFlipToNextPage() method in the WizardPage returns.
>
> Hope this is what you want.
>
> Vijay
>
> exquisitus wrote:
>
>
>>Hi.
>
>
>>Not exactly. Setting setPageComplete to false disables the finish
>>button, but as well the next button. But this next button is needed. On
>>the first page of the wizard, only the next and the cancel button should
>>be enabled. Back button is of course automatically disabled. I need a
>>flag or method to disable the finish button on this page as well. Any ideas?
>
>
>>Thanks Dominik
>
>
>>Vijay schrieb:
>
>
>>>Hi,
>>>You will have to do this in the setPageComplete method.
>>>If this is set to true then the finish button will be enabled. Else it
>>>wont.
>>>Hope this helps.
>>>Vijay
>>>exquisitus wrote:
>>>
>>>
>>>
>>>>Hello.
>>>
>>>
>>>>How can I disable the finish button in a multi-page wizard on the FIRST
>>>>page? Both pages must be completed, before it should be possible to
>>>>finish the wizard.
>>>
>>>
>>>>Thanks Dominik
>>>
>>>
>>>
>
>
|
|
|
Powered by
FUDForum. Page generated in 0.05433 seconds