Vcl.ComCtrls.TTreeNodes.InsertObject
Delphi
function InsertObject(Sibling: TTreeNode; const S: string; Ptr: TCustomData): TTreeNode;
C++
TTreeNode* __fastcall InsertObject(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
Inserts a tree node containing data into the tree view before the node specified by the Node parameter.
Call InsertObject to add a new sibling to the Sibling parameter, immediately preceding Sibling. The S parameter specifies the Text property of the new node and the Ptr parameter specifies the Data property of the new node. InsertObject returns the new node.
Note: The memory referenced by Ptr is not freed when the tree nodes object is freed.