DHTMLX Docs & Samples Explorer

Multi-line items

To make tree nodes' labels multiline use the following method:

Source
<link rel="STYLESHEET" type="text/css" href="../../codebase/dhtmlxtree.css">
<script  src="../../codebase/dhtmlxcommon.js"></script>
<script  src="../../codebase/dhtmlxtree.js"></script>
 
<table>
    <tr>
        <td>
            <div id="treeboxbox_tree" style="width:500px; height:260px;background-color:#f5f5f5;border :1px solid Silver;"/>
        </td>
        <td style="padding-left:25" valign="top">
            <div id="treeboxbox_tree2" style="width:500px; height:260px;background-color:#f5f5f5;border :1px solid Silver;"/>                
        </td>
    </tr>
</table>
<p>To make tree nodes' labels multiline use the following method:<p>
<script>
tree = new dhtmlXTreeObject("treeboxbox_tree", "100%", "100%", 0);
 
tree.setImagePath("../../codebase/imgs/csh_bluebooks/");
tree.enableMultiLineItems("300px");
tree.enableTreeLines(false);
tree.loadXML("../common/tree_ml.xml");
tree2 = new dhtmlXTreeObject("treeboxbox_tree2", "100%", "100%", 0);
 
tree2.setImagePath("../../codebase/imgs/csh_bluebooks/");
tree2.enableMultiLineItems("");
tree2.enableTreeLines(false);
tree2.loadXML("../common/tree_ml.xml");
</script>