TCustomShellTreeView.Collapse procedure
Removes child nodes (if needed) when the specified tree node is collapsed.
Declaration
procedure Collapse(Node: TTreeNode); overrideArguments
Node | Tree node affected in the method. |
Description
Collapse is an overridden method in
TCustomShellTreeView
used to update the tree node specified in
Node when it changes from
the expanded to the collapsed state. It uses the value in the
ExpandCollapseMode property to determine whether existing child nodes are
removed from the collapsed tree node.
When ExpandCollapseMode is set to ecmCollapseAndClear, the DeleteChildren method in Node is called to free its child nodes. The operation is performed in a BeginUpdate / EndUpdate block to prevent updates to the control while the child nodes are deleted.
Collapse calls the inherited method prior to exit to update scroll bars on the control and to signal the OnCollapsed event handler (when assigned).
No actions are performed in the method when ComponentState is set to csDestroying.
Collapse is called when a tree node has executed its Collapse method.
Added in LCL version 3.0.
See also
An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.
