Enable/Disable button in toolbar using commands [message #486811] |
Sat, 19 September 2009 12:41  |
Eclipse User |
|
|
|
Hi,
in my project using "org.eclipse.ui.menus" I added a toolbar (using menu contribution) to my developed view.
Now I want to disable a button on that toolbar using another button. I tried the "isEnabled"-method in the according command-handler of the command I want to disable. This works the command gets disabled, but not the button in the toolbar. I tried to find the realted toolbarManager (which I want to update), but I cannot find it - Can anyone help?
Tobias
|
|
|
Re: Enable/Disable button in toolbar using commands [message #486813 is a reply to message #486811] |
Sat, 19 September 2009 13:15  |
Eclipse User |
|
|
|
I found a blog-post, just yesterday, that explains commands pretty
well...especially how to use enable/disable.
http://blog.eclipse-tips.com/2009/01/commands-part-1-actions -vs-commands.html
This is the first article in a series of 5, youmight only be interested in the
later ones.
regards
Marc
TSchwalb schrieb:
> Hi,
> in my project using "org.eclipse.ui.menus" I added a toolbar (using menu
> contribution) to my developed view.
> Now I want to disable a button on that toolbar using another button. I
> tried the "isEnabled"-method in the according command-handler of the
> command I want to disable. This works the command gets disabled, but not
> the button in the toolbar. I tried to find the realted toolbarManager
> (which I want to update), but I cannot find it - Can anyone help?
>
> Tobias
|
|
|
Powered by
FUDForum. Page generated in 0.03544 seconds