Vcl.ComCtrls.TTreeNodes.AddChildObject
Delphi
function AddChildObject(Parent: TTreeNode; const S: string; Ptr: TCustomData): TTreeNode;
C++
TTreeNode* __fastcall AddChildObject(TTreeNode* Parent, const System::UnicodeString S, Vcl::Controls::TCustomData Ptr);
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
function | public | Vcl.ComCtrls.pas Vcl.ComCtrls.hpp |
Vcl.ComCtrls | TTreeNodes |
Description
Adds a new tree node containing data to a tree view.
The node is added as the last child of the node specified by the Parent parameter. The S parameter specifies the Text property of the new node. The Ptr parameter specifies the Data property value of the new node. AddChildObject returns the node that has been added.
Note: The memory referenced by Ptr is not freed when the tree nodes object is freed.
See Also
Code Examples