Tree


How to give different icons for different node in same tree.

i want to give different icons for different node.


You can specify it directly in XML


<tree im0=“some.gif” im1=“some1.gif” im0=“some2.gif”


im0 - node without child
im1 - closed node with child
im2 - opened node with child

The same can be done by javascript as



tree.setItemImage(itemId,“some.gif”);
tree.setItemImage(itemId,“some1.gif”,“some2.gif”);