Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

TcxCustomImageList.AddBitmap(TBitmap,TBitmap,TColor,Boolean,Boolean) Method

Appends the specified bitmap and its transparency mask bitmap to the image list.

#Declaration

Delphi
function AddBitmap(AImage: TBitmap; AMask: TBitmap; AMaskColor: TColor; AStretch: Boolean; ASmooth: Boolean): Integer;

#Parameters

Name Type Description
AImage TBitmap

A source image container.

AMask TBitmap

A transparency mask bitmap.

AMaskColor TColor

A transparency mask color.

AStretch Boolean

If True, the function upscales or downscales the image to fit the list dimensions. If False, divides the image into multiple images or truncates it as the Add function does.

ASmooth Boolean

If True, the function smooths the scaled image; otherwise, the function performs no additional operations on the image.

#Returns

Type Description
Integer

The index of the image within a TBitmap container passed as the AImage parameter if the add operation is successful; otherwise, -1.

#Remarks

In addition to the specified bitmap, you can pass its transparency mask bitmap as the AMask parameter. If nil (in Delphi) or nullptr (in C++Builder) is passed as the AMask parameter, the AddBitmap function generates a transparency mask bitmap based on a color passed as the AMaskColor parameter.

Note

The mask associated with the appended bitmap is ignored if the Masked property is set to False.

See Also