|
Re: How to tell what control is gaining focus when I'm losing focus? [message #459586 is a reply to message #459565] |
Thu, 11 August 2005 17:38 |
Eclipse User |
|
|
|
Originally posted by: mehow.remove.neurosoft.net
Try Display.getFocusControl(). If it doesn't in focusLost(), try such a
trick:
public void focusLost(FocusEvent event) {
final Display display = event.getDisplay();
display.asyncExec(new Runnable() {
public void run() {
Control focusControl
= display.getFocusControl();
...
}
}
}
The code will not be executed at once, but you won't see the difference,
and Display.getFocusControl() should return the right control.
Michal
Mark McLaren napisał(a):
> Is there any way to tell what control is gaining focus when my control
> loses it? In Swing, I could use the field FocusEvent.opposite. Is
> there any equivalent for SWT?
>
> Thanks
>
|
|
|
Powered by
FUDForum. Page generated in 0.03869 seconds