Sign in Join
FPDoc Onlineexperiment

TCustomImageList.AddIcon function

Member of TCustomImageListpublicIn unit ImgList

Adds an icon to the image list.

Declaration

pascal
function AddIcon(Image: TCustomIcon): Integer

Arguments

Image

The Icon to be added.

Function result

The index of the added icon, -1 if unsuccessful.

Description

AddIcon is used to add the TIcon instance in the Image parameter to the image list. AddIcon calls InsertIcon to store the Image at the ordinal position represented by the Count property. The return value contains the index of the newly added icon, or -1 if the icon could not be added to the list.

Use the Add or AddMasked method to store a TCustomBitmap descendant in the image list.

See also

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.