collapse

Syntax

Description

collapse(parent) collapses the nodes of
the parent tree or tree node. If parent is a
Tree object, then the top-level nodes in the tree display in
a collapsed state. Any children beyond the top level do not collapse. If parent is a
TreeNode object, then the specified node displays in a
collapsed state, but the children inside that node do not collapse.

collapse(parent,'all') collapses all
child nodes of the parent tree or tree node.

The Equipment child node is already expanded
because the previous collapse command collapsed only
the Cyclists node. If you want to collapse all
the child nodes, specify the 'all' option when you call
the collapse function.

This website uses cookies to improve your user experience, personalize content and ads, and analyze website traffic. By continuing to use this website, you consent to our use of cookies. Please see our Privacy Policy to learn more about cookies and how to change your settings.