Search
ToggleMode Enumeration
See Also
 






Specifies how expand/collapse of TreeNode-s will be triggered.

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

 Syntax

JavaScript  Copy Code

// enum
ToggleMode = {}

 Members

  Member name Value Description

HeaderClick

0

Indicates that expand/collapse will be triggered by a click on the node header.

IconClick

1

Indicates that expand/collapse will be triggered by a click on the +/- icon in the node header.

 Example

The following code creates a TreeView from an HTML <div> element called "treeview" and specifies that TreeNode-s will be expanded and collapsed when the user clicks on the header:

JavaScript  Copy Code

var ui = MindFusion.UI;

var treeView = new ui.TreeView(document.getElementById("treeView"));
treeView.width = treeView.height = ui.Unit.percentage(100);
treeView.theme = "standard";
treeView.loadOnDemand = true;
treeView.toggleMode = ui.ToggleMode.HeaderClick;

 See Also