[Overview][Constants][Types][Classes][Procedures and functions][Index] |
Collapses the current tree node, and optionally collapses any descendent nodes.
Source position: comctrls.pp line 3133
public procedure TTreeNode.Collapse( |
Recurse: Boolean |
); |
Recurse |
|
True to collapses all descendent nodes in the subtree. |
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.
Version 4.0 | Generated 2025-05-03 | Home |