updating browse button image for a custom browse action handler [message #1708057] |
Fri, 11 September 2015 22:33  |
Eclipse User |
|
|
|
Hi,
Is there a way change the image used for a browse button. I have a custom browse action handler class implementation for a Sapphire.Browse action. I specified the image for the action handler in the sdef but this doesn't seem to have any effect. This is the .sdef entry for my property. Does this look right?
<property-editor>
<action-handler-filter>
<impl>gov.pnnl.velo.sapphire.BrowseActionFilter</impl>
</action-handler-filter>
<action-handler>
<action>Sapphire.Browse</action> <impl>gov.pnnl.velo.sapphire.SWTCalendarBrowseActionHandler</impl>
<image>icons/calendar.png</image>
</action-handler>
<property>StartDate</property>
<property-editor>
I am able to use the same image for a Master-Details node and the image shows up on the outline view so I am sure it is not a file path issue.
In the sapphire samples. I see custom icons for custom action (custom create action and Sapphire.Sample.Message action) and image icons for custom action-handler where there is more than 1 action-handler for an action. The image of action-handler shows up in the menu after clicking the image for the custom action. The use case I am trying is not the same. Could some one please point me in the right direction
Thanks
Chandrika
|
|
|
Re: updating browse button image for a custom browse action handler [message #1708250 is a reply to message #1708057] |
Tue, 15 September 2015 00:19  |
Eclipse User |
|
|
|
I found the solution for this. I added the image to a custom action element instead of the action-handler and used this action's id in my action-handler
<action>
<id>Sapphire.Browse.SWTCalendar</id>
<context>Sapphire.ValuePropertyEditor</context>
<label>view calendar</label>
<image>icons/calendar.png</image>
</action>
Thanks
Chandrika
|
|
|
Powered by
FUDForum. Page generated in 0.01556 seconds