stringlistcontainer Exchange method
Return to Introduction  Previous page  Next page
Applies to
acStringListContainer component.  

procedure Exchange(Index1, Index2: Integer);  

The Exchange method swaps the position of two strings in the list.  
Call Exchange to rearrange the strings in the list. The strings are specified by their index values in the Index1 and Index2 parameters. Indexes are zero-based, so the first string in the list has an index value of 0, the second has an index value of 1, and so on.  
If either string has an associated object, Exchange changes the index of the object as well.  

See also
Add, Insert, Delete and GetFIFO methods;  
Strings, Names, Values and MaxSize properties;  
OnChange event.