Vcl.Outline.TCustomOutline.Insert

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

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

C++

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

Properties

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

Description

Inserts a node at a specified position.

Use Insert to add a TOutlineNode object to 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 in the position currently occupied by the node identified by Index. The new node is inserted at the same level as the node currently identified by Index, so that the original node and the new node are siblings and share the same parent. To add nodes to the beginning of the outline, specify zero (0) as the Index parameter.

Nodes that appear after the new node, including the one specified by Index before Insert is called, 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.

Insert returns the Index property of the new node.

See Also