Una forma práctica si solo lo usas en una simple forma es usar clases sobrepuestas... prueba con esta implementación:
Código Delphi
[-]
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, FileCtrl;
type
TFileListBox = class(FileCtrl.TFileListBox)
protected
procedure DrawItem(Index: Integer; Rect: TRect; State: TOwnerDrawState); override;
end;
TForm1 = class(TForm)
FileListBox1: TFileListBox;
private
public
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TFileListBox.DrawItem(Index: Integer; Rect: TRect; State: TOwnerDrawState);
begin
if odSelected in State then
Canvas.Brush.Color := clGray
else
case Index mod 4 of
0: Canvas.Brush.Color := clGreen;
2: Canvas.Brush.Color := clRed;
1, 3: Canvas.Brush.Color := clWhite;
end;
inherited;
end;
end.