[Overview][Types][Classes][Procedures and functions][Index] |
Removes child nodes (if needed) when the specified tree node is collapsed.
Source position: shellctrls.pas line 113
protected procedure TCustomShellTreeView.Collapse( |
Node: TTreeNode |
); override; |
Node |
|
Tree node affected in the method. |
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.
|
Controls the actions performed when a tree node is expanded or collapsed on the control. |
|
|
Performs actions needed when the specified tree node is collapsed. |
|
|
Event handler signalled when a tree node has been collapsed on the control. |
|
|
Collapses the current tree node, and optionally collapses any descendent nodes. |
|
|
Indicates whether the tree node has child nodes. |
|
|
Removes all child nodes and descendants in the tree structure. |
|
Version 4.0 | Generated 2025-05-03 | Home |