[Overview][Types][Classes][Procedures and functions][Index] Reference for unit 'ImgList' (#lcl)

TCustomImageList.Scaled

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

Declaration

Source position: imglist.pp line 421

public property TCustomImageList.Scaled : Boolean
  read FScaled
  write FScaled
  default False;

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).

See also

TCustomImageList.Resolution

  

Provides indexed access to an image resolution with the specified image width.

TCustomImageList.Resolutions

  

Provides access to the image resolutions (or sizes) used in the image lists.

TCustomImageList.ResolutionForPPI

  

Gets a scaled resolution with the specified width, display density, and scaling factor.

TCustomImageList.WidthForPPI

  

Image width needed for the specified display density (PPI).

TCustomImageList.OnGetWidthForPPI

  

Event handler used to override the scaled width for a display density.

TCustomImageList.FindResolution

  

Finds the image resolution which uses the specified image width.


Version 3.2 Generated 2024-02-25 Home