Hi Greg,
There is no support for inserting arbitrary controls into the editor toolbar. We can add a facility to the action definition to hint presentation (image+label vs just image). If you need this, please open an enhancement request.
Note that if we do support this, it would be with flat toolbar button, rather than raised button like Mylyn, which looks out of place on the toolbar.
- Konstantin
From: sapphire-dev-bounces@xxxxxxxxxxx [mailto:sapphire-dev-bounces@xxxxxxxxxxx] On Behalf Of Greg Amerson
Sent: Wednesday, April 13, 2011 9:54 AM
To: Sapphire project
Subject: [sapphire-dev] Custom contribution items in toolbar
If you haven't determined it yet, I'm trying to replace an existing editor I wrote that has a rudimentary Forms based UI with a new editor based on Sapphire. So far I've been able to do everything I was doing before (and so, so much more!) with the sapphire based one. There is one item that I am missing right now and thats custom buttons in a toolbar. In my previous editor I would add ToolbarButtonContribution class which is a subclass of ControlContribution that lets you add an arbitrary control to a toolbar. In my case I wanted to show a toolbar button that had the text label as well as an image. I copied this code from Mylyn, how they use the custom buttons in the toolbars of many of their task editors. (See mylyn-style-toolbar-items.png)
Is there a way to accomplish this with Actions contributed via sapphire-extensions.xml? I have my action showing up correctly but it is just the icon, no text (See sapphire-toolbar-item.png)
Thanks!
--
Greg Amerson
Liferay, Inc.