Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Sapphire » updating browse button image for a custom browse action handler
updating browse button image for a custom browse action handler [message #1708057] Fri, 11 September 2015 22:33 Go to next message
chandrika siva is currently offline chandrika sivaFriend
Messages: 9
Registered: September 2015
Junior Member
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. Sad 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 Go to previous message
chandrika siva is currently offline chandrika sivaFriend
Messages: 9
Registered: September 2015
Junior Member
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
Previous Topic:Outline view gets minimized with no node selection and hence a empty form
Next Topic:Using custom editor when file is initially loaded from persisted state
Goto Forum:
  


Current Time: Mon Nov 19 11:01:15 GMT 2018

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

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

Back to the top