Classes.TStrings.Move

From RAD Studio VCL Reference
Jump to: navigation, search

Contents

Delphi Information

From Classes.pas

	procedure Move(CurIndex: Integer; NewIndex: Integer); virtual;


Unit: Classes

Type: method

Visibility: public

Member Of: TStrings

C++ Information

From Classes.hpp

	virtual void __fastcall Move(int CurIndex, int NewIndex);


Unit: Classes

Type: method

Visibility: public

Member Of: TStrings

Description

Changes the position of a string in the list.


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:

For Delphi:

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

For C++:

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

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

See Also

Code Samples


Personal tools
Translations
Newest Version