Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Krajesh on Aug 05, 2008 22:38
open dhtmlx forum
Tree


How to give different icons for different node in same tree.
i want to give different icons for different node.
Answer posted by Support on Aug 06, 2008 01:33

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");