1. #1
    Ext User
    Join Date
    Apr 2010
    Posts
    2
    Vote Rating
    0
    bonkers is on a distinguished road

      0  

    Question Change style for GXT button component

    Change style for GXT button component


    Hi,
    Can someone help me with changing button styles? I would like to get rid of the metallic gray 3D look of button component and replace it with a white non-metallic background (i have my own custom_btn.gif as well). What style do I need to define in my custom css file? I tried something like
    .button
    {
    background-image:url(../../<mydir>/images/default/button/<custom>_btn.gif);
    font:normal 11px tahoma, verdana, helvetica;
    }
    but it seems to mess up the button L&F. I use setStyleName to use my style. setStylePrimaryName and addStyleName doesn't seem to help.
    Thanks!

  2. #2
    Sencha User
    Join Date
    Aug 2008
    Posts
    226
    Vote Rating
    2
    TheBuzzer is on a distinguished road

      0  

    Default


    setstylename can work. However best way to figure it out is to use firefox with firebug.

  3. #3
    Ext GWT Premium Member
    Join Date
    Oct 2009
    Posts
    66
    Vote Rating
    0
    bogusky is on a distinguished road

      0  

    Default


    Quote Originally Posted by bonkers View Post
    Hi,
    Can someone help me with changing button styles? I would like to get rid of the metallic gray 3D look of button component and replace it with a white non-metallic background (i have my own custom_btn.gif as well). What style do I need to define in my custom css file? I tried something like
    .button
    {
    background-image:url(../../<mydir>/images/default/button/<custom>_btn.gif);
    font:normal 11px tahoma, verdana, helvetica;
    }
    but it seems to mess up the button L&F. I use setStyleName to use my style. setStylePrimaryName and addStyleName doesn't seem to help.
    Thanks!
    Firebug is my best friend.
    java
    Code:
            button.addStyleName("btn_in_detail");
    css
    Code:
    .btn_in_detail .x-btn-tl,.btn_in_detail .x-btn-tr,.btn_in_detail .x-btn-tc,
    .btn_in_detail .x-btn-ml,.btn_in_detail .x-btn-mr,.btn_in_detail .x-btn-mc,
    .btn_in_detail .x-btn-bl,.btn_in_detail .x-btn-br,.btn_in_detail .x-btn-bc
        {
        background-image: url(resources/sprites/btn_in_detail.gif) !important;
    }

  4. #4
    Sencha User
    Join Date
    Mar 2010
    Posts
    62
    Vote Rating
    0
    maqjav is on a distinguished road

      0  

    Default


    Hello.

    That method works! but how do we change the on over and on click states?.
    I tried:
    Code:
    .btn_in_detail .x-btn-over .x-btn-mc {
     -- Other background position
    }
    and nothing... it seems it doesn't overwrite that style.

    Some ideas?

  5. #5
    Ext GWT Premium Member
    Join Date
    Oct 2009
    Posts
    66
    Vote Rating
    0
    bogusky is on a distinguished road

      0  

    Default


    Quote Originally Posted by maqjav View Post
    Hello.

    That method works! but how do we change the on over and on click states?.
    I tried:
    Code:
    .btn_in_detail .x-btn-over .x-btn-mc {
     -- Other background position
    }
    and nothing... it seems it doesn't overwrite that style.

    Some ideas?
    1. Use firebug please
    2. your image sprite is probably wrong. standard GXT button sprite has bg for 3 state (normal, mouse-over, click)

  6. #6
    Sencha User
    Join Date
    Feb 2011
    Posts
    3
    Vote Rating
    0
    ekaitza is on a distinguished road

      0  

  7. #7
    Sencha User
    Join Date
    Feb 2011
    Posts
    3
    Vote Rating
    -1
    cut3as is an unknown quantity at this point

      -1  

    Default


    This is also my problem and I wanted also to overcome this situation. Thank you for all who replied and shared the code.

    contemporary furniture | modern lounge chairs

  8. #8
    Sencha User
    Join Date
    Oct 2011
    Posts
    1
    Vote Rating
    0
    medbfrankie is on a distinguished road

      0  

    Default


    Hello i am a new beginner of GXT program, i need to separate three button style:

    1. no frame , only word and icon.
    2. icon + button
    3. only button

    I tired this .btn_in_detail .x-btn-tl,.btn_in_detail .x-btn-tr,.btn_in_detail .x-btn-tc,
    .btn_in_detail .x-btn-ml,.btn_in_detail .x-btn-mr,.btn_in_detail .x-btn-mc,.btn_in_detail .x-btn-bl,.btn_in_detail .x-btn-br,.btn_in_detail .x-btn-bc { background-image: url(resources/sprites/btn_in_detail.gif) !important;}and delete those script background-image: url(resources/sprites/btn_in_detail.gif) !important;
    }

    but others button become fail, any way that i can separate those three button style without any effect each other?

    thanks!!

  9. #9
    Sencha User
    Join Date
    Oct 2011
    Posts
    1
    Vote Rating
    0
    andrewparker is on a distinguished road

      0  

    Default


    My problem is also related with this problem. can anybody solve it?

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