0

I have a TreePanel in Ext JS 3.4.0. The nodes are loaded via JSON.

First of all I need to have the same icons for all the nodes, no matter if they are leafs or not. So I don't want to have the "folder" icon for the nodes that have children. How is that possible?

Zorrocaesar
  • 748
  • 1
  • 7
  • 22

1 Answers1

0

If you set in JSON for all node .iconCls property to the same value, all nodes will have same icon

For example:

"iconCls": "icon-file",
"expanded": "true",
"children": [
   {
        "iconCls": "icon-file",
        "leaf": "true"
   }

Icon-file is the a css with icon you want, for example:

.icon-file
{
   background-image: url(../images/silk/grid.png) !important;
}
Draykos
  • 773
  • 7
  • 16