Unit 'ImgList' Package
[Overview][Types][Classes][Procedures and functions][Index] [#lcl]

TCustomImageList.Overlay

Assigns the specified image to the given overlay position for the image list.

Declaration

Source position: imglist.pp line 387

public procedure TCustomImageList.Overlay(

  AIndex: Integer;

  Overlay: TOverlay

);

Arguments

AIndex

  

Ordinal position of the image used as an overlay.

Overlay

  

Ordinal position in the internal array where the image index is stored.

Description

Overlay is a procedure which makes an image in the image list an overlay. An overlay image is drawn transparently over another image. An image list can have up 15 images designated as overlay images (0 is reserved for none).

AIndex contains the position in the image list for the image to use as an overlay image.

Overlay is a TOverlay value that indicates the position in Overlays where the value in AIndex is stored.

The Overlay method tells the image list that the image in AIndex is an overlay image referenced using the value in the Overlay parameter instead of the ordinal position in the image list.

Overlay sets the value in the HasOverlays property to True when AIndex contains a valid index position in the image list. Otherwise, the image indexes in each of the positions in Overlays are re-examined to determine the value for HasOverlays. Any element in Overlays with a value other than -1 has an assigned overlay image index.

Use the DrawOverlay method to draw an image along with a specific overlay image.

Use ClearOverlays to reset the image indexes stored in Overlays to the unused value (-1).

See also

TCustomImageList.HasOverlays

  

Indicates if any images in the list have been used as an overlay image.

TCustomImageList.ClearOverlays

  

Clears images indexes assigned as overlay images in the image list.

TCustomImageList.DrawOverlay

  

Renders an image with an overlay to the specified canvas.

TCustomImageList.Overlays

  

Provides access to images used as overlays in the image list.

TCustomImageListResolution.DrawOverlay

  

Draws the specified image with the given overlay.

TOverlay

  

Represents the valid index positions used to access overlay image assignments.