开发者

adding action to toolbar in formpage

开发者 https://www.devze.com 2022-12-08 04:25 出处:网络
I want to add a button to the toolbar in my page that derives from FormPage. I use the code: Action action = some action...

I want to add a button to the toolbar in my page that derives from FormPage. I use the code:

Action action = some action...

action.setImageDescriptor(som descriptor...);

toolBarManager.add(action);

When i run the editor I don't see nothing in the place were the button should be. If I'm hovering it with the mouse it changes to a hand icon. 开发者_运维知识库But if i click the action doesn't run.


Sounds like it's your ImageDescriptor returning a null image. Make sure you're creating an image that eclipse can deal with. Is your image a .png, .gif? Are you developing on Windows? After packaging, Java won't find it in the archive if you're case is wrong even though Windows is not case sensitive.

0

精彩评论

暂无评论...
验证码 换一张
取 消