Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » Enable/Disable button in toolbar using commands
Enable/Disable button in toolbar using commands [message #486811] Sat, 19 September 2009 12:41 Go to next message
TSchwalb  is currently offline TSchwalb Friend
Messages: 9
Registered: September 2009
Junior Member
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 Go to previous message
Marc Schlegel is currently offline Marc SchlegelFriend
Messages: 92
Registered: July 2009
Member
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
Previous Topic:How to make the workbench requery view sizes?
Next Topic:How to update a view for action
Goto Forum:
  


Current Time: Thu Apr 25 14:53:01 GMT 2024

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

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

Back to the top