TdxTreeViewNodes Class
Declaration
TdxTreeViewNodes = class(
TdxTreeViewPersistent
)
Remarks
The class members allow you to do the following:
Add nodes to the container (Add, AddFirst, AddObject, AddObjectFirst, AddChild, AddChildFirst, AddChildObject, AddChildObjectFirst, AddNode, Insert, InsertObject, and InsertNode).
Count nodes (Count).
Access tree nodes (Item and GetFirstNode).
Sort nodes (AlphaSort and CustomSort).
Manage Tree View updates (BeginUpdate and EndUpdate).
Access a handle to the node container (Handle).
The Tree View’s Items property references a TdxTreeViewNodes object.
Refer to the following topic for information on how to use a tree node container: Tree View Control.
Example
The following code checks all nodes in the Tree View control that have child nodes:
var
ANode: TdxTreeViewNode;
begin
dxTreeViewControl1.BeginUpdate;
for ANode in dxTreeViewControl1.Items do
ANode.Checked := ANode.Count > 0;
dxTreeViewControl1.EndUpdate;
end;
Note
A Tree View control shows node checkboxes if the control’s OptionsView.ShowCheckBoxes property is set to True.