Vcl.ComCtrls.TTreeNodes.AddChildObjectFirst

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

function AddChildObjectFirst(Parent: TTreeNode; const S: string;  Ptr: TCustomData): TTreeNode;

C++

TTreeNode* __fastcall AddChildObjectFirst(TTreeNode* Parent, 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 tree node containing data to a tree view.

The node is added as the first child of the node specified by the Parent parameter. Nodes that appear after the added node are moved down one row and reindexed with valid Index values. The S parameter specifies the Text property of the new node. The Ptr parameter specifies the Data property value of the new node. AddChildObjectFirst 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