Predefined action not showing icon on toolbar.

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

Predefined action not showing icon on toolbar.

Postby 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) {

   public void run() {;
Posts: 1
Joined: Mon Oct 15, 2007 8:43 am

Re: Predefined action not showing icon on toolbar.

Postby Eric Clayberg » Wed Oct 17, 2007 1:19 pm

Give this a try in the latest v6.4.1 Designer build.
Eric Clayberg
Software Engineering Manager

Author: "Eclipse Plug-ins"
Eric Clayberg
Posts: 4503
Joined: Tue Sep 30, 2003 6:39 am
Location: Boston, MA USA

Return to SWT Designer

Who is online

Users browsing this forum: No registered users and 2 guests