1. #1

    Default [GXT 2.0 m3] Pb with setIconStyle

    [GXT 2.0 m3] Pb with setIconStyle


    Hi,
    Just upgraded to 2.0-m3 and saw that the setIconStyle method on a Button doesn't add the class to my button element (in the generated Html) anymore.
    Code:
    Button excelButton = new Button();
    excelButton.setText(buttonLabel);
    excelButton.setIconStyle("excel-button");
    It was working with 2.0-m2.

    Thanks,
    Jean-Marie

  2. #2
    Software Architect
    Join Date
    Sep 2007
    Posts
    13,971
    Vote Rating
    132
    sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light

      0  

    Default


    This is not a bug. I will move this to the help forum. SetIconStyle only sets the icon.

    If you want a stylename, you have to use addStyleName

  3. #3

    Default


    Quote Originally Posted by sven View Post
    If you want a stylename, you have to use addStyleName
    This doesn't work either.

  4. #4
    Software Architect
    Join Date
    Sep 2007
    Posts
    13,971
    Vote Rating
    132
    sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light

      0  

    Default


    You should probably explain what you are doign with this css rule.

  5. #5

    Default


    I recompiled my code -without changing aything- with the 2.0-m2, and both setIconStyle and addStyleName are working.
    So I confirm that this seems to be a bug in the 2.0-m3 version.
    If I'm wrong, tell me why.

    This is what I'm doing :
    Code:
    Button excelButton = new Button();
    excelButton.setText(buttonLabel);
    excelButton.setIconStyle("excel-button");
    excelButton.addSelectionListener(...);
    ToolBar toolbar = new ToolBar();
    toolbar.add(excelButton);
    this.setTopComponent(toolbar);
    And whatever I put in my CSS, the excel-button class isn't applied to the button :
    Code:
    <button class="x-btn-text" ...>
    Thanks.

  6. #6
    Software Architect
    Join Date
    Sep 2007
    Posts
    13,971
    Vote Rating
    132
    sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light

      0  

    Default


    addStyleName is not appliying anything to the button element. It is applying something to the main element. You need to update your css rules according to that. setIconStyle is only for setting an icon (this was also documented)

  7. #7

    Default


    Ok.
    My rule was :
    Code:
    button.excel-button {...}
    I needed to prefix it with button with the 2.0-m2 version, to override other gxt rules, 'cause the class was applied to the button element.
    And now -in the 2.0-m3- I agree, not anymore.
    Thanks anyway.
    Jean-Marie

Thread Participants: 1

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi