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

# TCustomImageList.Move

Moves an image from the position at CurIndex to NewIndex.

## Declaration

Source position: imglist.pp line 384

`public procedure TCustomImageList.Move(`
`ACurIndex: Integer;`
`ANewIndex: Integer`
`);`

## Arguments

`ACurIndex` |  | Current Index position for the image(s) to be moved.
`ANewIndex` |  | New index position for the image(s).

## Description

Move is a procedure used to relocate images stored at the position in CurIndex to the position in NewIndex for each of the resolutions in the image list. No actions are performed in the method when ACurIndex and ANewIndex contain the same value.

Move calls CheckIndex to verify that the values in ANewIndex and ACurIndex are valid index positions in the image list. An exception is raised in CheckIndex if either value is invalid for the bounds in the image list.

Move uses the Resolutions enumerator to visit each of the image resolutions in the image list. The InternalMove method in the TCustomImageListResolution instance is called to relocate image data using the specified positions. If the handle for the image resolution has been allocated, the widgetset class calls its Move method to mirror the change to the image list.

Move sets the value in the internal Changed flag to True, and calls the Change method to perform notifications for the change event.

## See also

TCustomImageList.CheckIndex |  | Ensures that an Index position is valid for the bounds of the image list.
TCustomImageList.Resolutions |  | Provides access to the image resolutions (or sizes) used in the image lists.
TCustomImageList.Change |  | Sends change notifications when the image list is updated.