Search code examples
buttoniconseclipse-scout

Eclipse Scout Tool button not show image on RAP


I see this tutorial, and create abstract form tool button. But in RAP I can't configure the icon image.

My tool button is like this :

 @Order(10.0)
public class TestPageTool extends AbstractFormToolButton {

  @Override
  protected String getConfiguredIconId() {

    return Icons.EclipseScout;
  }

  @Override
  protected String getConfiguredText() {

    return TEXTS.get("TestPage");
  }
}

and the result is :

enter image description here


Solution

  • A solution can be found in the widgets demo application (live demo, source, about)

    The images are defined twice:

    In the RAP client, you also need to customize the CSS, to bind the icon defined in the RAP Bundle with the Tool Button. Check the content of application.css to have an example:

    org.eclipsescout.demo.widgets.ui.rap/theme/application.css