TCustomImageList.AddLazarusResource function
Gets a bitmap from a Lazarus resource and stores it in the image list.
Declaration
function AddLazarusResource(const ResourceName: string;
MaskColor: TColor=clNone): IntegerArguments
ResourceName | The name of the Lazarus resource. |
MaskColor | The mask color for transparent images. clNone for solid (opaque) images. |
Function result
Position where the image was stored.
Description
AddLazarusResource is an Integer function used to load and store a
bitmap from a Lazarus resource.
ResourceName contains the Lazarus resource loaded in the method.
MaskColor is a TColor value used as the transparency color in
masked images. The default value for the parameter is clNone, and indicates
that the image should be rendered as an opaque (solid) image.
AddLazarusResource calls the CreateBitmapFromLazarusResource
routine to get the TCustomBitmap for the specified ResourceName. When
MaskColor contains a value other that clNone, it is set as the transparent
color in the bitmap and transparency is enable for the image.
AddLazarusResource calls the Add method to store the bitmap in the
image list. The return value contains the ordinal position in the image list
where the bitmap was stored.
See also
An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.
