uitreenode
Create tree node.
📝Syntax
h = uitreenode()
h = uitreenode(parent)
h = uitreenode(..., propertyName, propertyValue)
📥Input Arguments
Parameter Description
parent parent object.
propertyName, propertyValue name-value pairs.
📤Output Arguments
Parameter Description
h UI object.
📄Description

n = uitreenode(parent) creates a tree node in a uitree or under another TreeNode. Properties: Text, NodeData, Icon, ContextMenu.

💡Examples
Captured UI component for the help image.
f = uifigure('Visible', 'off', 'Name', 'Tree nodes', 'Position', [100 100 420 260]);
tr = uitree(f, 'Position', [70 40 210 180]);
n1 = uitreenode(tr, 'Text', 'Project');
uitreenode(n1, 'Text', 'Input');
uitreenode(n1, 'Text', 'Results');
expand(tr);
drawnow();
Example illustration
uitreenode
f = uifigure();
t = uitree(f);
n = uitreenode(t, 'Text', 'Node 1', 'NodeData', [1 2 3]);
🔗See Also
uifigure
🕔Version History
Version Description
2.0.0 initial version
Edit this page on GitHub