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

# TCustomImageList.SetWidthHeight

Sets the Width and Height for images in the default resolution.

## Declaration

Source position: imglist.pp line 315

`protected procedure TCustomImageList.SetWidthHeight(`
`NewWidth: Integer;`
`NewHeight: Integer`
`);`

## Arguments

`NewWidth` |  | New value for the Width property.
`NewHeight` |  | New value for the Height property.

## Description

SetWidthHeight is a a procedure used to set the values in the Width and Height properties to the values in the NewWidth and NewHeight parameters. Width and Height establish the default resolution (or image size) used in the image list. Changing either of the values in the method causes the image list, its Resolutions, and assigned Overlay images to be discarded by calling the Clear method.

Set the values in the Height and Width properties prior to adding images to the image list. Or, use the CreateSize constructor to specify the default resolution when the image list is created.

SetWidthHeight is used in the implementation of the Assign, SetHeight, and SetWidth methods.

## See also

TCustomImageList.Width |  | Width of images in the default resolution for the image list.
TCustomImageList.Height |  | Height of images in the default resolution for the image list.
TCustomImageList.Resolution |  | Provides indexed access to an image resolution with the specified image width.
TCustomImageList.Overlay |  | Assigns an overlay index for the specified image in the image list.
TCustomImageList.Clear |  | Removes all images store in the image list.
TCustomImageList.CreateSize |  | Initializes the image list using the specified height and width.
TCustomImageList.Assign |  | Stores properties from the specified image list to the current class instance.