[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.platform.swt] Re: Listener (event handler) enforcement call

If you are programmatically "click" a button SWT is not firing an event by convention! You need to call notifyListener to make this happen. On the other side it seems that there's something wrong in your app design if a click in another area fires a click in your button.

Tom

KiMoon schrieb:
we are trying to add Listener onto Widget and then trying to make the Listener force to be called from other part.
Considering with a button, if we add Selection Listener on a Button (needed codes are typed necessarily),


how do we call Selection Listener as if button was clicked from other part (even though the real button was not clicked indeed).

button.addSelectionListener(new SelectionAdapter() { <====== the part to be called
public void widgetSelected(final SelectionEvent e) }
});


if there is such a way to do it, please let me know

Thanks.



--
B e s t S o l u t i o n . at
--------------------------------------------------------------------
Tom Schindl                                          JFace-Committer
--------------------------------------------------------------------