TcxCustomImageList.Add(TdxSmartImage,string,string) Method
Loads an image and its transparency mask bitmap and adds them to the image list.
Declaration
function Add(AImage: TdxSmartImage; const AKeywords: string = ''; const ASourceFileName: string = ''): Integer; overload;
Parameters
Name | Type | Description |
---|---|---|
AImage | TdxSmartImage | The source image container. |
AKeywords | string | Optional. The string of keywords associated with the added image. If you pass a string with keywords as the If the |
ASourceFileName | string | Optional. The path to the source image file. If you pass a string with the path to the source image file, the GetSourceFileName function can return this string for the added image. If the |
Returns
Type | Description |
---|---|
Integer | The index of the image passed as the AImage parameter if the add operation is successful; otherwise, |
Remarks
Call the Add
function to add one or more images to the list from a source TdxSmartImage class instance. Depending on the source image size, the Add
function divides the loaded image into multiple images, adds the image as is if its size already matches the image list dimensions, or truncates the image to match the list dimensions.
The number of added images depends on how much the source image width and height exceeds Width and Height property values. For instance, if the source image is 260
x 32
pixels, and the Width and Height properties are both set to 16
, the Add
function divides the image into 32 images whose dimensions are 16
x 16
pixels, and appends these images to the image list. The rightmost part of the source image whose size is 4
x 16
pixels is truncated.