Vcl.Outline.TCustomOutline.AddChild

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

function AddChild(Index: LongInt; const Text: string): LongInt;

C++

int __fastcall AddChild(int Index, const System::UnicodeString Text);

Properties

Type Visibility Source Unit Parent
function public
Vcl.Outline.pas
Vcl.Outline.hpp
Vcl.Outline TCustomOutline

Description

Adds a child node to a node in the outline.

Use AddChild to add a TOutlineNode object as the child of a node in the outline. Text specifies the Text property value of the new node.

Index specifies where to add the new node. The new node is positioned in the outline as the last child of the node identified by Index. To add nodes to the top level of the outline (off the root), specify zero (0) as the Index parameter.

Nodes that appear after the new node are moved down one row and reindexed in the Items property array with valid Index values. If BeginUpdate has been called, the Items array is not reindexed until the EndUpdate method is called.

AddChild returns the Index property of the new node.

See Also