[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.platform.swt] JFace Dialog - change default focus

We have a situation in our project where we display a dialog (using a JFace Dialog) and we want to change the default focus from the OK/Cancel buttons to a button (or other widget type) on the "body" of the dialog. The "body" is implemented as a SWT Composite. Creating a Composite that contains all of the widgets for a given screen has been the approach we've been using for screens in general. This way we can place the composite on any container (dialog, wizard, editor tab, etc.).

The reason we need to do this is that the user community that will end up using this will tend to hit Enter/Return on their keyboards to move from field to field on the screens. (They have been accustomed to using terminal-based applications and hitting Return is how they enter data and navigate through a screen's fields.) If they do this on dialogs, the will trigger the OK button and end up closing the window.

Any ideas on how to shift the focus to where we need it, -or- some other solution?