RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TWideStrings.Move Method

Changes the position of a string in the list.

Pascal
procedure Move(CurIndex: Integer; NewIndex: Integer); virtual;
C++
virtual __fastcall Move(int CurIndex, int NewIndex);

Use Move to move the string at position CurIndex so that it occupies the position NewIndex. The positions are specified as 0-based indexes. For example, the following lines of code move the string in the first position to the last position.

MyStringsObject.Move(0, MyStringsObject.Count)

 

MyStringsObject->Move(0, MyStringsObject->Count - 1);

If the string has an associated object, the object remains associated with the string in its new position. 

 

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!