TTreeNode.Collapse procedure
Collapses the current tree node, and optionally collapses any descendent nodes.
Declaration
procedure Collapse(Recurse: Boolean)Arguments
Recurse | True to collapses all descendent nodes in the subtree. |
Description
Collapse calls the BeginUpdate and EndUpdate methods in the
TreeView control (when assigned) to reduce the number of updates performed
while one or more of the tree nodes are displayed in the collapsed state.
Recurse indicates whether child and all descendent nodes are also
collapsed in the method. The default value is
False, and causes only
the current node instance to be displayed in the collapsed state. When set to
True, child nodes are visited and recursively collapsed.
After completion of the method, the affected nodes will have their Expanded properties set to False and their States flags are updated accordingly.
Use Expand to reverse the collapse process. Use ExpandParents to expand all ancestor tree nodes for the current node.
An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.
