RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TCustomOutline.Add Method

Adds a node to the outline.

Pascal
function Add(Index: LongInt; const Text: string): LongInt;
C++
__fastcall LongInt Add(LongInt Index, const AnsiString Text);

Use Add 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 as the last sibling of the node identified by Index. To add nodes to the beginning of the outline, 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. 

Add returns the Index property of the new node. 

 

Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!