Control appearance and behavior of tree node
Tree nodes are the items listed in a tree hierarchy. The
uitreenode function creates a tree node and sets any required properties
before displaying it. By changing tree node property values, you can modify certain
aspects of its appearance and behavior. Use dot notation to refer to a specific object
uf = uifigure; tree = uitree(uf); node = uitreenode(tree); node.Text = 'Item 1';
Text— Node text
'Tree Node'(default) | character vector | string scalar
Node text, specified as a character vector or string scalar.
NodeData— Node data
(default) | array
Node data, specified as an array of any type. Specify
NodeData to share
node-relevant data within your app code.
Icon— Icon image file
Icon image file, specified as a character vector or string scalar. Specify a file name that is on the MATLAB® path when the user runs the app. Alternatively, specify a full path to the image file.
Parent— Parent object
Parent object, specified as a
GraphicsPlaceholderarray (default) | array of
Children, returned as an array of
You cannot add or remove children using the
property, but you can use the property to view the list of children. The
order of the children reflects the order of the child nodes displayed on the
screen. To add a child to this list, set the
property of the child component to be the
To reorder the children, use the
Objects with the
'off' do not list in the
Type— Type of graphics object
This property is read-only.
Type of graphics object, returned as