TCustomIcon.Add procedure
Add - an Icon formatted as
AFormat, with specified
Height and
Width.Declaration
procedure Add(AFormat: TPixelFormat; AHeight: Word; AWidth: Word)Description
Add is procedure used to create an image for the icon with the
attributes specified in
AFormat,
AHeight, and
AWidth. Add calls
GetIIndex to determine if an icon
image with the requested attributes already exists in the image list for the
icon. An
EInvalidGraphicOperation exception is raised when the
image already exists in the internal image list.
Add calls UnshareImage to release the shared image handle, and
adds a new image class instance to the shared icon. If the icon image is the
first one in the list, the value in Current is set to 0
(zero) and the UpdateCurrentView method is called.
Use Current to make an icon image active for the class instance. Use
AssignImage to store the image at the position in Current.
An experiment, built from Lazarus main 2dfa93c66e of 10-22-2026. Not the official Lazarus documentation.
