This week's book giveaway is in the HTML/CSS/JavaScript forum.
We're giving away four copies of Practical SVG and have Chris Coyier on-line!
See this thread for details.
Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Get button created by ActionContributionItem

 
Trevor Whitney
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If I use it creates an SWT button that runs my JFace action when clicked. Is there any way I can directly call methods on this button, so I can directly manipulate it (such as adding an image to it)?
 
Trevor Whitney
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The reason I ask is because I would like to create a JFace action with ImageDescriptor, but I only want that image to appear on the button, not in the menu. Right now, I'm having to create 2 instances of my action, I pass one to the menu, and the other one gets the ImageDescriptor and gets passed to the button. It seems like I should be able to just tell the menu to hide all images, or suppress the image when I add it to the menu. Having to create 2 instances of the same action, because of different graphical representations seems counter-intuitive to the MVC architecture that JFace is trying to provide.

Thanks for any help!
 
Evil is afoot. But this tiny ad is just an ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!