I need to set only icon to button, and no text. Also, I need this button to be TextButton.
Following situation: I place icon, and I dont place any text to it.
Result - I see empty space on the right. When I am looking on it in firebug, it shows empty <td> tag.
According to sources of gxt:
Code:
  public void render(final ButtonCell<C> cell, Context context, C value, SafeHtmlBuilder sb) {
    String constantHtml = cell.getHTML();
    boolean hasConstantHtml = constantHtml != null && constantHtml.length() != 0;
    boolean isBoolean = value != null && value instanceof Boolean;
    // is a boolean always a toggle button?
    String text = hasConstantHtml ? cell.getText() : (value != null && !isBoolean)
        ? SafeHtmlUtils.htmlEscape(value.toString()) : "";
variable text is never null. But below, in the same method we see:
Code:
        case LEFT:
          inside.appendHtmlConstant("<tr>");
          writeIcon(inside, icon, height);
          if (text != null) {
            int w = width - (icon != null ? icon.getWidth() : 0) - 4;
            writeText(inside, text, w, height);
          }
It is checked on null, but it is never null it self. That is why we see empty space on button.

Does any workaround exist?