Community
Participate
Working Groups
API is availble for a wizard page to specify the default button: ( (Wizard)getWizard() ).getShell().setDefaultButton(button); Authors of wizards may wish to specify a default button other than next/finish when they are both disabled. This can be done easily on an event that occurs on the page, but the initial default button (the button that will be the default when the page appears) cannot be set. The only signal the wizard page recieves that it becomes visible is setVisble(boolean), but the wizard dialog will update the button bar after the setVisible call: WizardDialog::showPage(): currentPage.setVisible(true); oldPage.setVisible(false); // update the dialog controls update(); We have an inconsistency here that we should fix. Currently: (1) you can set the Default Button on a page event, even if Finish/Next are enabled (page is complete). (2) you cannot set the inital Default Button We should change this behaviour to: (3) you can only set the Default button if the page is incomplete (4) you can set the initial default button if the page is incomplete -OR- (5) do not allow the wizardPage to set the default button. #4 is an easy fix, the old behaviour would set Finish as default if both Next/Finish were disabled, this version won't change the default if both Finish/Next are disabled. WizardDialog::updateButtons(): if (canFinish) getShell().setDefaultButton(finishButton); else if (canFlipToNextPage) getShell().setDefaultButton(nextButton); #3 and #5 would be hard to regulate, because it would require cutting off access to the wizard shell. A safe way to do #3 would be to add API to WizardDialog: setDefaultButton(Button). This would set the default button only if next AND finish are disabled which would provide a safe means to set the default button. NOTES:
PRODUCT VERSION: 130
Defer
Reopen for investigation
There is no plan towork on this