LMD-Tools Font Image List Guide


TLMDFontImagesBase


type

  TLMDFontImagesBase = class(TCustomImageList);

 

Represents the base class for TLMDFontImageList component and its TLMDReplicaImages replicas. Contains the real implementation of the font based image lists and provides common methods and properties.

 

procedure Change;

Allows to force the image list to refresh icons content. This may be useful when the logic of the OnAdjustColor event handler is changes during program execution.

procedure AsBitmap(AIndex: Integer; B: TBitmap);

Fills the existing B bitmap with the image of AIndex's image list icon. The bitmap size will be changed to conform with the image list size. The bitmap PixelFormat will be also changed to fp32Bit.

procedure AsPng(AIndex: Integer; I: TPngImage);

Fills the existing I png-image with the image of AIndex's image list icon. The png-image size will be changed to conform with the image list size.

property ColorDepth: TColorDepth;

The property is re-declared with read-only access. Always return pf32Bit.

property Color: TColor;

Allows to specify the color of  image list icons. This color can be overridden at an item level using item's Color property. The default values of the Color property are: clWindowText (for TLMDFontImageList) and clBtnShadow (for TLMDReplicaImages).

property Width: Integer;

Specifies images width. Contained images are updated accordingly.

property Height: Integer;

Specifies images height. Contained images are updated accordingly.

property Margin: Integer;

Specifies the width of the empty space margin around the real drawing within the image. Real drawing size can be calculated as:
Min(Width, Height) - 2 * Margin.

property DisabledStyle: TLMDFontDisabledStyles;

Provides fdsAlpha and fdsSaturate options. fdsAlpha requires the image list to alpha blend the icons with the transparency level specified by DisabledAlpha property. fdsSaturate reduces the color saturation of the icon to grayscale.

property DisabledAlpha: Byte;

Specifies a number in a range of 0..255, which determines the transparency for disabled images.

property StyleElements: TLMDFontStyleElems;

Analogous to VCL controls StyleElements, the property provides a set of options allow to enable or disable VCL Styling of some particular aspects.

 

The only option, provided so far is fseSystemColors, which determines whether the system colors like clWindowText should be re-colored according to the current VCL Style.

 

For more information please read VCL Styles Recoloring section from this topic.

property Scaled: Boolean;

Determines whether the image list should be scaled automatically on DPI change. Scaling changes the values of Width, Height and Margins properties. The property available only for Delphi 10.4 and newer IDE versions.

 

For more information please read High DPI Support section from this topic.

property OnAdjustColor: TLMDFontAdjustColor;

The event allow to specify the color of any individual icon. AIndex parameter determines the current item index. The event handler should assign required color value to the var AColor parameter.

 

If the color adjusting algorithm depends of an external state, Change method should be called to force the component to update contained images on that state change.