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

TCustomImageList.Insert

Inserts an image into each image resolution at the specified position.

Declaration

Source position: imglist.pp line 381

public procedure TCustomImageList.Insert(

  AIndex: Integer;

  AImage: TCustomBitmap;

  AMask: TCustomBitmap

);

Arguments

AIndex

  

Ordinal position where the image is stored.

AImage

  

Bitmap image stored in the method.

AMask

  

Transparency mask, Nil for opaque.

Description

Insert is a procedure used to insert an image into each of the resolutions for the image list at the ordinal position specified in AIndex.

AImage is a TCustomBitmap instance that contains the image data stored in the image list. No actions are performed in the method when AImage is unassigned (contain Nil).

AMask is a TCustomBitmap instance that contains the mask that defines the transparent areas in the image. When AMask is Nil, no transparent areas are defined in AImage. Use InsertMasked to insert bitmaps with a specific transparent color.

Insert calls the CreateDefaultResolution method to ensure that the default image resolution has been created using the value in the Width property.

Insert uses the Resolutions enumerator to visit each of the TCustomImageListResolution instances used in the image list. The ScaleImage method is called to resize the bitmaps in AImage and Mask to the image width for the resolution. The InternalInsert method for the image resolution is called to store the scaled raw image data at the position in AIndex.

See also

TCustomImageList.Resolutions

  

Provides access to the image resolutions (or sizes) used in the image lists.

TCustomImageList.ScaleImage

  

Scales an image and its optional mask to the specified target size.

TCustomImageListResolutions

  

Provides multiple image resolutions in TCustomImageList.


Version 3.2 Generated 2024-02-25 Home