Switch Image of a Handler in a e4 rcp

二次信任 提交于 2021-02-10 14:57:13

问题


I have an e4 rcp application and I want to extend my application with a toolbar item that should change the icon URL when the user execute it.

Is there any possibility to do this as I can do it in a MPart?


回答1:


Just call the setIconURI method of MToolItem in your handler for the tool item:

@Execute
public void execute(MToolItem mitem)
{
  mitem.setIconURI("platform:/plugin/......");

  ... other code
}


来源:https://stackoverflow.com/questions/46191767/switch-image-of-a-handler-in-a-e4-rcp

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!