DHTMLX Docs & Samples Explorer

Changing iconsets

dhtmlxTree is highly customizable JavaScript tree menu. You can use different iconsets for trees by changing images path.


 

 

Source
<link rel="STYLESHEET" type="text/css" href="../../codebase/dhtmlxtree.css">
<script  src="../../codebase/dhtmlxcommon.js"></script>
<script  src="../../codebase/dhtmlxtree.js"></script>
 
 
 
<table width="100%">
    <tr>
        <td valign="top">
            <div id="treeboxbox_tree0" style="width:250px; height:218px;border :1px solid Silver;"></div><br>
        </td>
    </tr>
    <tr>
        <td>&nbsp;</td>
    </tr>
    <tr>
        <td valign="top">
            <div id="treeboxbox_tree1" style="width:250px; height:218px;border :1px solid Silver;"></div><br>
        </td>
    </tr>
    <tr>
        <td>&nbsp;</td>
    </tr>
    <tr>
        <td>
        <div id="treeboxbox_tree2" style="width:250px; height:218px;border :1px solid Silver;; overflow:auto;"></div><br>
        </td>
    </tr>
</table>
 
<script>
tree = new dhtmlXTreeObject("treeboxbox_tree0", "100%", "100%", 0);
tree.setSkin('dhx_skyblue');
tree.setImagePath("../../codebase/imgs/");
tree.loadXML("../common/tree_b.xml");
tree = new dhtmlXTreeObject("treeboxbox_tree1", "100%", "100%", 0);
 
tree.setSkin('dhx_skyblue');
tree.setImagePath("../../codebase/imgs/csh_scbrblue/");
tree.loadXML("../common/tree_a.xml");
tree = new dhtmlXTreeObject("treeboxbox_tree2", "100%", "100%", 0);
 
tree.setSkin('dhx_skyblue');
tree.setImagePath("../../codebase/imgs/csh_yellowbooks/");
tree.loadXML("../common/tree_b.xml");
</script>