Default Icon Tree


I’m searching a way to decrease JSON data structure of my tree. All items have the same icon, even if it’s a parent open or closed.

Here is my structure:


Is it possible de give a default icon for all my items ? which permit to remove im0,im1,im2 :



There is a special method for this: setStdImages:

tree = new dhtmlXTreeObject("treeboxbox_tree2", "100%", "100%", 0); tree.setSkin('dhx_skyblue'); tree.setImagePath("../dhtmlxTree_prof/codebase/imgs/csh_bluebooks/"); tree.setIconPath("../../bmp/"); tree.setStdImages("223.png","223.png","223.png"); tree.setDataMode("json"); tree.loadJSONObject({ id:'0', item:[ {id: 'node1', text: 'node1', item:[ {id: 'node11', text: 'node11'}, {id: 'node12', text: 'node12'} ]} ]});

It’s exactly what I need.

You are welcome!