Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Disable finish button in multi-page wizard
Disable finish button in multi-page wizard [message #222395] Tue, 06 April 2004 10:27 Go to next message
Eclipse UserFriend
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 Go to previous messageGo to next message
Eclipse UserFriend
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 Go to previous messageGo to next message
Eclipse UserFriend
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 Go to previous messageGo to next message
Eclipse UserFriend
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 Go to previous message
Eclipse UserFriend
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
>>>
>>>
>>>
>
>
Previous Topic:platform starts slow/no functionality
Next Topic:Team work with Eclipse v2 and v3
Goto Forum:
  


Current Time: Wed Sep 25 07:34:49 GMT 2024

Powered by FUDForum. Page generated in 0.05433 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top