Sign in Join
FPDoc Onlineexperiment

TCustomShellListView.GetBuiltinImageIndex function

Member of TCustomShellListViewprotectedIn unit ShellCtrls

Gets the index position for the built-in icon used for the specified path or file name.

Declaration

pascal
function GetBuiltinImageIndex(const AFileName: string; 
 ALargeImage: Boolean): Integer

Arguments

AFileName

File name or path used to find the associated image.

ALargeImageTrue if the large image list is used for the image.

Function result

Ordinal position for the built-in image.

Description

GetBuiltinImageIndex is an Integer function used to get the image index for a built-in icon provided by the operating system or platform.

The return value contains the ordinal position for the image used for the file name or path specified in AFilename. The return value is -1 if an image could not be selected for the value in AFileName.

When ALargeImage is True, the index value refers to a large image as used in the vsIcon view style. When set to False, it refers to a small image as used in the other view styles.

GetBuiltinImageIndex calls the GetBuiltInImageIndex method in the widgetset class to get the return value for the method. The widgetset class handles storing the built-in image to the correct image list when the handle for the image list has not already been assigned.

GetBuiltinImageIndex is called from the PopulateWithRoot method when UseBuiltInIcons is set to True.

In the current LCL version, GetBuiltinImageIndex is implemented for the Windows platform only.

See also

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