Sign in Join
FPDoc Onlineexperiment

TImageListCache.RegisterBitmap procedure

Member of TImageListCachepublicIn unit ImageListCache

Adds the specified bitmap to the image list for a cache listener.

Declaration

pascal
procedure RegisterBitmap(AListener: IImageCacheListener; 
 ABitmap: TBitmap; ABitmapCount: Integer=1; 
 AHorizontalLayout: Boolean=True)

Description

RegisterBitmap is a method used to register use the image in ABitmap for the cache listener specified in AListener. RegisterBitmap ensures that the cache listener and an image list exist in the cache. The RegisterListener method is called is the listener is not found in the cache. If an image list does not already exist in the cache, a new cache item is allocated.

ABitmap can contain a "sliced" image, which has multiple adjacent images each using the height for the bitmap. The image list in the cache is configured to use the number of images indicated in the ABitmapCount argument. Each image has the same height and width.

The cache listener in AListener is notified if an action caused a change to the index positions used in the image list.

See also

An experiment, built from Lazarus main 2dfa93c66e of 10-22-2026. Not the official Lazarus documentation.