Sign in Join
FPDoc Onlineexperiment

TImageList.Scaled property

Member of TImageListpublishedIn unit Controls

Controls whether image sizes are automatically scaled for different display density (Pixels per Inch) settings.

Declaration

pascal
property Scaled:;

Description

Scaled is a Boolean property used to enable or disable automatic scaling of image sizes for different resolutions (Pixels per Inch).

When Scaled is True, images in the list are dynamically scaled from the Width and Height used in the image list to the size needed for a given display density (Pixels per Inch). If the scaled image size is one of the Resolutions found in the image list, the images in the Resolution are used. If an image size is needed that does not exist in Resolutions, the next smaller size is selected from the predefined images by using the WidthForPPI property and a specified PPI setting.

The OnGetWidthForPPI event handler is signalled (when assigned) to allow the calculated image width to be overridden. Applications can provide a TCustomImageListGetWidthForPPI procedure which uses custom scaling logic, or performs simple image width substitution for a given display density.

See WidthForPPI for information about use of the pixels per inch setting to derive the scaling factor and the resulting size for images.

The ResolutionForPPI property provides access to an image list using an image size scaled to a specific PPI setting.

When Scaled is False, images are not dynamically scaled. The Width and Height specified in the image list are used.

The default value for the property is False and disables automatic scaling.

At design-time, use the image list property editor to maintain images or resolutions used in the image list. At run-time, use the methods provided in the class instance to maintain the image list.

Scaled is used in the implementation of the GetResolutionForPPI and GetWidthForPPI methods which implement the ResolutionForPPI and WidthForPPI properties (respectively).

This description is the one of ImgList.TCustomImageList.Scaled.

See also

  • Resolution
  • Resolutions
  • ResolutionForPPI
  • WidthForPPI
  • OnGetWidthForPPI
  • FindResolution

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.