SWT Designer allows you to create the views, editors, perspectives, pref pages, composites, etc. that comprise Eclipse SWT & RCP applications and plug-ins.
Moderators: Konstantin.Scheglov, gnebling, Alexander.Mitin, jwren, Eric Clayberg
by sstarr » Tue Oct 16, 2007 5:31 am
In design mode, when I add a predefined action to a toolbar, I see text instead of an icon. I'm working on the toolbar of a view. When "action" is added to the toolbar I see an Icon, when "action_1" is added I see text. Is it possible for predefined actions to show icons instead of text on toolbars in design mode?
- Code: Select all
action = new Action("My Action") {
public void run() {
}
};
action.setImageDescriptor(ResourceManager.getPluginImageDescriptor(RCPDeveloperProjPlugin.getDefault(), "icons/alt_window_16.gif"));
action_1 = new TestingAction("Test Action");
action_1.setImageDescriptor(ResourceManager.getPluginImageDescriptor(RCPDeveloperProjPlugin.getDefault(), "icons/alt_window_16.gif"));
- Code: Select all
public class TestingAction extends Action {
public TestingAction(String text) {
super(text);
}
public void run() {
super.run();
}
}
-
sstarr
-
- Posts: 1
- Joined: Mon Oct 15, 2007 8:43 am
Return to SWT Designer
Who is online
Users browsing this forum: No registered users and 2 guests