Passt. Images-Eigenschaft setzen, dann das Event nutzen.
Delphi-Quellcode:
constructor TMFileView.Create(AOwner: TComponent);
begin
inherited;
Images := AppGlobals.IconManager.Images;
Header.Options := [hoColumnResize, hoDrag, hoShowSortGlyphs, hoVisible];
TreeOptions.SelectionOptions := [toMultiSelect, toRightClickSelect];
TreeOptions.AutoOptions := [toAutoScrollOnExpand];
TreeOptions.PaintOptions := [toThemeAware, toUseExplorerTheme];
end;
function TMFileView.DoGetImageIndex(Node: PVirtualNode; Kind: TVTImageKind;
Column: TColumnIndex; var Ghosted: Boolean;
var Index: Integer): TCustomImageList;
var
NodeData: PFileNodeData;
begin
inherited;
Result := inherited;
if (Kind = ikNormal) and (Column = 0) then
begin
NodeData := GetNodeData(Node);
Index := AppGlobals.IconManager.Icon[ExtractFileExt(NodeData.FileObject.Filename)];
Result := AppGlobals.IconManager.Images;
end;
end;