Show text and image for an Action in a Toolbar [message #330112] |
Tue, 15 July 2008 15:15 |
Eclipse User |
|
|
|
Originally posted by: subs._nospam_consertum.com
Hi,
This is probably a dumb question, but I can't find the answer...
I have created a ToolBar and added a ToolBarManager to it. I have
created an Action and setText() and setImageDescriptor() on it.
When it displays, I only see the image for the action - not the text. Is
there a way to display Image AND text for the Action?
Thanks
--
Derek
|
|
|
|
Re: Show text and image for an Action in a Toolbar [message #330127 is a reply to message #330123] |
Tue, 15 July 2008 19:01 |
Eclipse User |
|
|
|
Originally posted by: subs._nospam_consertum.com
Paul Webster wrote:
> Add an ActionContributionItem instead of the Action ... you can use
> org.eclipse.jface.action.ActionContributionItem.setMode(int) to force
> the text to be shown.
>
> PW
>
Perfect.
Now the next problem. I am dynamically changing the text, based on
selection in the UI. Over a certain length (about 20 characters + image
size), the action completely disappears, but reappears when the text
length shortens again.
Any ideas why this might be happening?
Thanks
--
Derek
|
|
|
Powered by
FUDForum. Page generated in 0.03823 seconds