Vcl.ComCtrls.TTreeNodes.AddChild
Delphi
function AddChild(Parent: TTreeNode; const S: string): TTreeNode;
C++
TTreeNode* __fastcall AddChild(TTreeNode* Parent, const System::UnicodeString S);
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
function | public | Vcl.ComCtrls.pas Vcl.ComCtrls.hpp |
Vcl.ComCtrls | TTreeNodes |
Description
Adds a new tree node to a tree view.
The node is added as a child of the node specified by the Parent parameter. It is added to the end of Parent's list of child nodes. The S parameter specifies the Text property of the new node. AddChild returns the node that has been added. If the tree view is sorted, AddChild inserts the node in the correct sort order position, rather than as the last child of the Node parameter.
See Also
Code Examples