|
|
|
Re: [EMFForms] Setting default focus on control of ViewModel [message #1456407 is a reply to message #1455458] |
Thu, 30 October 2014 06:24  |
Eclipse User |
|
|
|
Hi,
so you implemented your own editor, which embeds EMF Forms? And you do
not want to focus the first control, but a specific one?
Could you report a Bug for that, preferably with an example to reproduce.
Best regards
Jonas
Am 29.10.2014 12:45, schrieb Phil Wim:
> Hi Jonas,
>
> like you said. The focus is set to the first visible widget. Finally i
> had to override the setVisible of my WizardPage to see the focus:
>
>
> @Override
> public void setVisible(boolean visible) {
> super.setVisible(visible);
> if (visible) {
> Control control = getControl();
> if (!control.setFocus()) {
> postSetFocus(control);
> }
> }
> }
>
> private void postSetFocus(final Control control) {
> Display display = control.getDisplay();
> if (display != null) {
> display.asyncExec(new Runnable() {
> @Override
> public void run() {
> control.setFocus();
> }
> });
> }
> }
>
>
> I want to archive the same for my Editor. I saw in MEEditorPage an
> overwritten setFocus() and form.setShowFocusedControl(true). I have the
> same structure for my editor. But still no focus on the first visible
> widget.
> Anyl ideas?
|
|
|
Powered by
FUDForum. Page generated in 0.17011 seconds