Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Why does not ToolStripMenuButton show icon while ToolStripButton does?

    Both type of button extends StretchImgButton, but ToolStripMenuButton does not show icon, why?

    #2
    After added String imgHTML = Canvas.imgHTML(GWT.getHostPageBaseURL() + "images/icons/48/" + iconName + ".png"), it shew the icon, but the title still does not alianed on the center.How to fix?

    private ToolStripMenuButton getToolMenuStripButton(String title, String iconName,Menu menu) {
    ToolStripMenuButton ret = new ToolStripMenuButton(title,menu);
    if (iconName == null)
    iconName = "cube_blue";

    String imgHTML = Canvas.imgHTML(GWT.getHostPageBaseURL() + "images/icons/48/" + iconName + ".png");
    //ret.setTitle("<span>" + imgHTML + "&nbsp;" + title + "</span>");
    ret.setTitle(imgHTML + /*"&nbsp;" + */title);
    ret.setAlign(Alignment.CENTER);

    return ret;
    }

    Comment

    Working...
    X