[Overview][Constants][Types][Classes][Procedures and functions][Index] | Reference for unit 'ValEdit' (#lcl)

# TValueListStrings.Exchange

Swaps the values and item definitions at the specified positions.

## Declaration

Source position: valedit.pas line 99

`public procedure TValueListStrings.Exchange(`
`Index1: Integer;`
`Index2: Integer`
`); override;`

## Arguments

`Index1` |  | Position of the item value and definition to swap.
`Index2` |  | Position of the item value and definition to swap.

## Description

Exchange is a procedure used to swap the values and item definitions at the specified positions.

Exchange uses the TValueListEditor that owns the class to invalidate any cached rows in the control. A visible editor in the control is also hidden. Exchange calls the inherited method using the values in Index1 and Index2 as arguments. Exchange swaps the item definitions at the specified positions as well. A visible editor in TValueListEditor is restored when needed.