Vcl.ComCtrls.TTreeNodes.AddObject
Delphi
function AddObject(Sibling: TTreeNode; const S: string; Ptr: TCustomData): TTreeNode;
C++
TTreeNode* __fastcall AddObject(TTreeNode* Sibling, const System::UnicodeString S, void * Ptr);
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
function | public | Vcl.ComCtrls.pas Vcl.ComCtrls.hpp |
Vcl.ComCtrls | TTreeNodes |
Description
Adds a new node containing data to a tree view.
The node is added as the last sibling of the node specified by the Sibling parameter. The S parameter specifies the Text property of the new node. The Ptr parameter specifies the Data property value of the new node. AddObject 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