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

TCustomImageList.AddIcon

Adds an icon to the list, returning the index of the icon or -1 if not successful.

Declaration

Source position: imglist.pp line 170

public function TCustomImageList.AddIcon(

  Image: TCustomIcon

):Integer;

Arguments

Image

  

The Icon to be added.

Function result

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

Description

Adding graphics other than bitmaps can be implemented by converting the graphics item into a bitmap, which then can be added to the image list. Most graphics classes support such a conversion, so that specialized methods are redundant.

See also

TCustomImageList.InsertIcon

  

Insert an Icon into the list.

The latest version of this document can be found at lazarus-ccr.sourceforge.net.