Skip to main content



      Home
Home » Eclipse Projects » Rich Client Platform (RCP) » Actions and SWT Buttons
Actions and SWT Buttons [message #448435] Mon, 24 April 2006 15:07 Go to next message
Eclipse UserFriend
I know how to create an RCP Action, and invoke it from
toolbars, menus, or hotkeys.

How does one invoke it from an ordinary SWT button?

/jg
Re: Actions and SWT Buttons [message #448439 is a reply to message #448435] Mon, 24 April 2006 17:01 Go to previous messageGo to next message
Eclipse UserFriend
You would add a listener to the button. Then invoke your Action from the
listener code. Here is some basic listener code to which you could add
the code to invoke your action:

myButton.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(final SelectionEvent e) {
// ADD CODE HERE
}});
Re: Actions and SWT Buttons [message #448890 is a reply to message #448435] Sat, 06 May 2006 02:29 Go to previous message
Eclipse UserFriend
you have to call the run method of the action in the selection event of the button
Previous Topic:How to do away with hard coding of view
Next Topic:[HOW TO] change first location of help view?
Goto Forum:
  


Current Time: Sun Aug 31 17:08:42 EDT 2025

Powered by FUDForum. Page generated in 0.03707 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top