Focused: Boolean
The Focused property determines whether the tree node has a focus.
Available values:
true. Focus is set on the node.
false. Focus is not set on the node.
Use JSON or the setFocused method to set the property value and the getFocused method to get the property value.
To execute the example, the page must contain the TreeList component named «treeList» (see Example of Creating the TreeList Component). Determine whether the node with the Africa contents has a focus:
// Determine whether the node with the Africa contents has a focus if (treeList.findText("Africa").getFocused()) { console.log("Focus is set on the node with the Africa contents"); } else { console.log("Focus is not set on the node with the Africa contents"); }
The result of the node focus checking is displayed to the console:
There is no focus on the node with the Africa contents.
See also: