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

TCustomShellListView.GetBuiltinImageIndex

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

Declaration

Source position: shellctrls.pas line 286

protected function TCustomShellListView.GetBuiltinImageIndex(

  const AFileName: string;

  ALargeImage: Boolean

):Integer;

Arguments

AFileName

  

File name or path used to find the associated image.

ALargeImage

  

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

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

See also

TCustomShellListView.UseBuiltInIcons

  

Indicates if icons provided by the OS or platform are used for items in the list.

TCustomShellListView.PopulateWithRoot

  

Fills the list view with file system information for the directory in Root.

TCustomListView.LargeImages

  

Image list which contains "big" icons displayed for view styles on the control.

TCustomListView.SmallImages

  

Image list which contains "small" icons used for view styles.


Version 4.0 Generated 2025-05-03 Home