Thank you for reporting this bug. We will make it our priority to review this report.
  1. #1
    Sencha User
    Join Date
    Oct 2012
    Location
    Belarus, Minsk
    Posts
    15
    Vote Rating
    1
    karenina is on a distinguished road

      0  

    Default ButtonCellDefaultAppearance: problems with icon display

    ButtonCellDefaultAppearance: problems with icon display


    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?

  2. #2
    Sencha - GXT Dev Team
    Join Date
    Feb 2009
    Location
    Minnesota
    Posts
    2,639
    Vote Rating
    80
    Colin Alworth is just really nice Colin Alworth is just really nice Colin Alworth is just really nice Colin Alworth is just really nice Colin Alworth is just really nice

      0  

    Default


    If not displaying text, why are you using a TextButton? Why not IconButton or ToolButton?

  3. #3
    Sencha User
    Join Date
    Oct 2012
    Location
    Belarus, Minsk
    Posts
    15
    Vote Rating
    1
    karenina is on a distinguished road

      0  

    Default


    In future we can use both text and icon there(and there is possibility for customer to add this text)

Thread Participants: 1

Tags for this Thread

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar