DHTMLX Docs & Samples Explorer

Item's sign and highlighting

To show/hide cross sign of any item in the tree you should select an item, then click on an appropriate action link.

Hide item's cross sign
Show item's cross sign

There is the possibility to switch on item's highlighting feature - when it is on, item's label will be highlighted during the mouse over. To achieve this you should set the tree.enableHighlighting() method to true.



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 valign="top">
            <div id="treeboxbox_tree" style="width:250px; height:218px;background-color:#f5f5f5;border :1px solid Silver;"></div>
        </td>
        <td rowspan="2" style="padding-left:25" valign="top">
 
<script>
tree = new dhtmlXTreeObject("treeboxbox_tree", "100%", "100%", 0);
tree.setSkin('dhx_skyblue');
tree.setImagePath("../../codebase/imgs/csh_bluefolders/");
tree.enableHighlighting(true);
tree.loadXML("../common/tree_a.xml");
function hide() {
    tree.showItemSign(tree.getSelectedItemId(), false);
};
function show() {
    tree.showItemSign(tree.getSelectedItemId(), true);
};
</script> <br><br>