Search
TreeView.draw Method
See Also
 






Control.draw override.

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

 Syntax

JavaScript  Copy Code

function draw ()

 Example

The following code creates programmatically a TreeView with a TreeNode:

JavaScript  Copy Code

function loadWindow(sender)
{
  var treeView = new ui.TreeView();
  treeView.width = treeView.height = ui.Unit.percentage(100);
  treeView.theme = "standard";

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

  sender.element.querySelector("#nav_tree").appendChild(tree.draw());
  tree.attach();
}

 See Also