TCustomIcon.GetBestIndexForSize function
Gets the ordinal position for the image closest to the requested size.
Declaration
function GetBestIndexForSize(ASize: TSize): IntegerDescription
The default icon size from GetSystemMetrics is used when
ASize does not have explicit values in its cx and
cy members. The best color depth is determined using the
GetDeviceCaps routine for the screen context.
GetBestIndexForSize iterates over the items in the internal image list to find the TIconImage which most closely matches the required values. The return value is -1 if no images are stored in the internal image list for the icon.
An experiment, built from Lazarus main 2dfa93c66e of 10-22-2026. Not the official Lazarus documentation.
