1. #1
    Sencha User
    Join Date
    Apr 2009
    Posts
    34
    Vote Rating
    0
    spiderweb is on a distinguished road

      0  

    Default Remove icon from tree node

    Remove icon from tree node


    I want the tree nodes to render without icons. I'm setting an iconCls: 'new-cls'
    which is:

    Code:
    .new-cls {
        background-image: url('../../lib/ext/resources/images/default/s.gif');
    }
    but this class is just adding to the existing one (x-tree-node-icon). If I remove x-tree-node-icon class (in the firebug) I get the desired result, but how do I remove it before the tree renders?

  2. #2
    Sencha User
    Join Date
    Oct 2009
    Location
    Australia
    Posts
    3
    Vote Rating
    1
    ilia000 is on a distinguished road

      0  

    Default


    I have the same problem and the only solution I found is to declare CSS class (new-cls in your case) like this:
    Code:
    .new-cls{
        background-image: none !important;
    }
    But this will leave an ugly white space between the text and the +/- icons. If you make it like this
    Code:
    .new-cls{
        background-image: none !important;
        width: 0 !important;
    }
    than it will be a nice looking tree without icons. Worked fine for me in FireFox, haven't tested it in IE.

    Upd.: Works in IE as well.

Thread Participants: 1