ShellBrowser Delphi Components Documentation
ContentsIndexHome
PreviousUpNext
ShellBrowser.TShellBrowser.GetOverlayIndex

Use GetOverlayIndex to get the index of the overlay icon of the current object.

Syntax
Pascal
function GetOverlayIndex: Integer;

Returns the index of the overlay icon in the system image list.

GetOverlayIndex returns the index of the overlay icon of the current object. This value can e.g. be assigned to the OverlayIndex property of a TListItem or TTreeItem.

This example creates a new TListItem for your drive C: with the correct caption, icon and overlay icon.

ShellBrowser.ObjectName := 'C:';
ListItem := TListItem.Create;
ListItem.Caption := ShellBrowser.ObjectName;
ListItem.ImageIndex := ShellBrowser.IconNumber;
ListItem.OverlayIndex := ShellBrowser.GetOverlayIndex;