RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TTabList.Insert Method

Inserts a string to the list at the position specified by Index.

Pascal
procedure Insert(Index: Integer; const S: string); override;
C++
virtual __fastcall Insert(int Index, const AnsiString S);

Call Insert to add the string S to the list at the position specified by Index. If Index is 0, the string is inserted at the beginning of the list. If Index is 1, the string is put in the second position of the list, and so on. 

If the string has an associated object, use the InsertObject method instead.

Note: If the list is sorted, calling Insert or InsertObject will raise an EListError exception. Use Add or AddObject with sorted lists.
 

 

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