1. #1
    Ext User
    Join Date
    Jun 2008
    Posts
    31
    Vote Rating
    0
    mwaschkowski is on a distinguished road

      0  

    Default how to change the size of the text in a ToggleToolItem?

    how to change the size of the text in a ToggleToolItem?


    I've tried a couple of things, but no workie:
    Code:
        homeItem = new ToggleToolItem();
        homeItem.setStyleAttribute("font", "normal 18px tahoma");
        homeItem.setStyleAttribute("x-btn-text", "normal 18px tahoma");
        System.out.println("style=" + homeItem.getBaseStyle());
    Calling getBaseStyle() returns null

    Thanks,

    Mark

  2. #2
    Ext User
    Join Date
    Jun 2008
    Location
    Utrecht, Netherlands
    Posts
    24
    Vote Rating
    0
    assassin is on a distinguished road

      0  

    Default


    Maybe you can use:

    Code:
    homeItem.addStyleName("cssClass");
    or
    homeItem.addStyleDependentName("cssClass");
    or
    homeItem.setStylePrimaryName("cssClass");
    For more information look at GWT Api class UIObject:
    http://google-web-toolkit-doc-1-5.go...w-summary.html

  3. #3
    Ext User
    Join Date
    Jun 2008
    Posts
    31
    Vote Rating
    0
    mwaschkowski is on a distinguished road

      0  

    Default


    Ugh, didn't think this would be so tough. Ah well, here is what I tried with no success:

    toolBar.addStyleName("bigText");
    toolBar.setStyleAttribute("font-size", "21");
    homeItem.addStyleName("bigText");
    homeItem.setStyleAttribute("font-size", "21");

    Help!

    Thanks,

    Mark

  4. #4
    Ext User
    Join Date
    Jun 2008
    Posts
    31
    Vote Rating
    0
    mwaschkowski is on a distinguished road

      0  

    Default


    Ugh, as well, can't seem to set a DataList to have a transparent background. I tried:
    menuList.setStyleAttribute("background-color", "transparent");
    menuItem.setStyleAttribute("background-color", "transparent");

    Not sure if I'm missing something with regards to css handling or not...

  5. #5
    Ext User
    Join Date
    Jun 2008
    Posts
    31
    Vote Rating
    0
    mwaschkowski is on a distinguished road

      0  

    Default


    OK, realized that I have to use camelCase (not the css style names) to change the styles programmatically.

    DataList can be updated like this:
    Code:
      list.setStyleAttribute("backgroundColor", "transparent");
    However, with the following code I can change the background color, but not the font size:

    Code:
        homeItem.setStyleAttribute("fontSize", "21px");
        homeItem.setStyleAttribute("backgroundColor", "red");
    Any suggestions?

    Thanks,

    Mark

  6. #6
    Sencha - GXT Dev Team darrellmeyer's Avatar
    Join Date
    May 2007
    Location
    Washington, DC
    Posts
    2,242
    Vote Rating
    2
    darrellmeyer is on a distinguished road

      0  

    Default


    setText is treated as HTML so you could do this:

    Code:
    item.setText("<span style='font-size: 12px'>GWT</span>");
    However, tab item will not render properly with a font size > 11px.

  7. #7
    Ext User
    Join Date
    Jun 2008
    Posts
    31
    Vote Rating
    0
    mwaschkowski is on a distinguished road

      0  

    Default


    OK, I won't go that route then, thanks for the info!

Thread Participants: 2

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