WizardDialog default button [message #332810] |
Mon, 10 November 2008 16:24 ![Go to next message Go to next message](theme/Solstice/images/down.png) |
Eclipse User![Friend of Eclipse Friend](/donate/web-api/friends_decorator.php?email=) |
|
|
|
Originally posted by: eclipse-news.rizzoweb.com
Is there any way, from my Wizard class, to remove the "default button"
designation from the WizardDialog's "Finish" button? I need to
circumvent the behavior of the wizard doing its finish work when the
Enter key is pressed.
Thanks in advance,
Eric
|
|
|
|
Re: WizardDialog default button [message #332822 is a reply to message #332812] |
Mon, 10 November 2008 20:37 ![Go to previous message Go to previous message](theme/Solstice/images/up.png) ![Go to next message Go to next message](theme/Solstice/images/down.png) |
Eclipse User![Friend of Eclipse Friend](/donate/web-api/friends_decorator.php?email=) |
|
|
|
Originally posted by: eclipse-news.rizzoweb.com
On 11/10/2008 11:44 AM, Remy Chi Jian Suen wrote:
> Eric Rizzo wrote:
>> Is there any way, from my Wizard class, to remove the "default button"
>> designation from the WizardDialog's "Finish" button? I need to
>> circumvent the behavior of the wizard doing its finish work when the
>> Enter key is pressed.
>
> IWizardContainer container = wizard.getContainer();
> Shell shell = container.getShell();
> shell.setDefaultButton(null);
Remy,
I already looked at that, but the comments for setDefaultButton() say:
* If the argument is not null, sets the receiver's default
* button to the argument, and if the argument is null, sets
* the receiver's default button to the first button which
* was set as the receiver's default button (called the
* <em>saved default button</em>).
Since the default button is set by WizardDialog, it can't be set back to
null. Worse, WizardDialog has code that explicitly sets the default
button whenever a page is re-validated - arrrrgh!
Eric
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03206 seconds