Using Buttons for triggering Actions [message #546569] |
Tue, 13 July 2010 12:11 |
Alexey Romanov Messages: 263 Registered: May 2010 |
Senior Member |
|
|
In my application, I'd like some Actions to be triggered not only by menu items or toolbar buttons, but by normal push buttons as well. Of course, these buttons need to be automatically disabled/enabled/etc. when actions are.
This role for menus and toolbars is played by ContributionManagers, but there doesn't seem to be one for buttons.
There is an obvious approach: create an Action subclass which takes a Button as a constructor parameter and overriding setEnabled/setDisabled/setText/... but is it actually needed or is there a simpler way?
[Updated on: Tue, 13 July 2010 12:24] Report message to a moderator
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.02852 seconds