1. #1
    Sencha User
    Join Date
    Aug 2013
    Posts
    8
    Vote Rating
    0
    mtadros is on a distinguished road

      0  

    Default Customize css for Grid

    Customize css for Grid


    Hello all,

    I would like to modify the default css for the column header across my entire application and was wondering what the best practice would be:

    GCIKTAMCP-C-com-sencha-gxt-widget-core-client-grid-ColumnHeader-ColumnHeaderStyles-headInner


    I am not sure what approach would work the best.

    Cheers,
    Maurice

  2. #2
    Ext GWT Premium Member icfantv's Avatar
    Join Date
    Sep 2011
    Location
    Superior, CO
    Posts
    411
    Vote Rating
    21
    icfantv will become famous soon enough icfantv will become famous soon enough

      0  

    Default


    So, two things:

    1. The first bit of the CSS class name is generated at compile time by the GWT compiler. It shrinks (and obfuscates) the name of the CSS class. This can be turned off in your gwt.xml file, but probably shouldn't because,

    2. You can override and inject your own CSS as such: http://www.sencha.com/forum/showthread.php?250743

  3. #3
    Sencha User
    Join Date
    Aug 2013
    Posts
    8
    Vote Rating
    0
    mtadros is on a distinguished road

      0  

    Default


    Thank you icfantv

    You are correct, I do want to
    obfuscate the css classes. I just have them "pretty" during development.

    With regards to the link you gave me. I have several, grids, buttons ... Would I have to overwrite them everywhere? Or would an approach like
    http://neiliscoding.blogspot.ca/2012/06/gxt-3-theme-guide-setup-customised.html work better?

    Cheers

  4. #4
    Sencha - GXT Dev Team
    Join Date
    Feb 2009
    Location
    Minnesota
    Posts
    2,732
    Vote Rating
    90
    Colin Alworth is a glorious beacon of light Colin Alworth is a glorious beacon of light Colin Alworth is a glorious beacon of light Colin Alworth is a glorious beacon of light Colin Alworth is a glorious beacon of light

      0  

    Default


    mtadros, the forum post that icfantv links to is following the same basic approach as the forum post you are linking to - in both cases an appearance is being used. In the blog post, the existing appearances are copied and modified, while in the forum link the existing appearances are extended. It is up to you which strategy you pick.

  5. #5
    Ext GWT Premium Member icfantv's Avatar
    Join Date
    Sep 2011
    Location
    Superior, CO
    Posts
    411
    Vote Rating
    21
    icfantv will become famous soon enough icfantv will become famous soon enough

      1  

    Default


    to expand on colin's response, if you would like to change the appearance of multiple widgets and reuse them in your app, the easiest thing to do would be to extend Grid, TextButton, etc... and inject your own *Appearance. then, instead of Sencha's Grid and TextButton, you would use your new one.

Thread Participants: 2