Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Extjs Treepanel: CSS to change default icons (node and leaf)

I have a tree panel like http://jsfiddle.net/bmbMy/ I try to change default icons (node and leaf) by using css. But that not working.

.x-grid-row  .x-grid-tree-node-expanded {
    background: url('http://icons.iconarchive.com/icons/sekkyumu/developpers/16/Play-Green-Button-icon.png') no-repeat center center !important;
}
.x-grid-row  .x-grid-tree-node-leaf {
    background-image:url('http://icons.iconarchive.com/icons/graphicrating/koloria/16/Button-Play-Pause-icon.png');
}

How can i do that thanks

like image 204
DeLe Avatar asked Jul 13 '13 16:07

DeLe


1 Answers

You haven't override the right css classes. Here is what you need:

.x-grid-tree-node-expanded .x-tree-icon-parent {
    background: url('http://icons.iconarchive.com/icons/sekkyumu/developpers/16/Play-Green-Button-icon.png') no-repeat center center !important;
}
.x-grid-row  .x-tree-icon-leaf {
    background-image:url('http://icons.iconarchive.com/icons/graphicrating/koloria/16/Button-Play-Pause-icon.png');
}

And the updated jsfiddle.

like image 126
Darin Kolev Avatar answered Oct 21 '22 06:10

Darin Kolev