Search
TreeNode.expandable Property
See Also
 






Gets a value indicating whether the TreeNode is expandable.

Namespace: MindFusion.Common.UI
File: TreeNode.js

 Syntax

JavaScript  Copy Code

get expandable() {}

 Property Value

Boolean. true if the TreeNode has children, otherwise false.

 Example

The following code creates a new TreeView element using a <div> element with id "treeview" initialized in an HTML page. Then it creates a TreeNode item, sets it expandable property and adss it to the items collection of the TreeView.

JavaScript  Copy Code

var treeView = new ui.TreeView(document.getElementById("treeView"));
treeView.width = treeView.height = ui.Unit.percentage(100);
treeView.theme = theme;

// create a tree node that will be a root in our hierarchy
var root = new ui.TreeNode("body");
root.expandable = true;
treeView.items.add(root);

 See Also