DHTMLX Docs & Samples Explorer

Attaching dhtmlxTree

Source
<link rel="stylesheet" type="text/css" href="../../codebase/dhtmlxwindows.css">
<link rel="stylesheet" type="text/css" href="../../codebase/skins/dhtmlxwindows_dhx_skyblue.css">
<script src="../../codebase/dhtmlxcommon.js"></script>
<script src="../../codebase/dhtmlxwindows.js"></script>
 
<!-- dhtmlxTree -->
<script src="../../../dhtmlxTree/codebase/dhtmlxtree.js"></script>
<link rel="stylesheet" type="text/css" href="../../../dhtmlxTree/codebase/dhtmlxtree.css">
<script src="../../codebase/dhtmlxcontainer.js"></script>
 
<div id="winVP" style="position: relative; height: 500px; border: #cecece 1px solid; margin: 10px;"></div>
<script>
var dhxWins,
w1,
tree;
function doOnLoad() {
    dhxWins = new dhtmlXWindows();
    dhxWins.enableAutoViewport(false);
    dhxWins.attachViewportTo("winVP");
    dhxWins.setImagePath("../../codebase/imgs/");
    w1 = dhxWins.createWindow("w1", 20, 30, 400, 350);
    w1.setText("Attaching dhtmlxTree");
    tree = w1.attachTree();
    tree.setSkin("dhx_skyblue");
    tree.setImagePath("../../../dhtmlxTree/codebase/imgs/csh_vista/");
    tree.loadXML("../common/tree.xml");
}
</script>