unit Unit1;

interface

uses
  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
  StdCtrls;

type
  TForm1 = class(TForm)
    ListBox1: TListBox;
    procedure ListBox1DrawItem(Control: TWinControl; Index: Integer;
      Rect: TRect; State: TOwnerDrawState);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.DFM}

procedure TForm1.ListBox1DrawItem(Control: TWinControl; Index: Integer;
  Rect: TRect; State: TOwnerDrawState);
begin
 with ListBox1.Canvas do
  begin
   Brush.Color:=clRed;
   Brush.Style:=TBrushStyle(Index);
   Pen.Style:=psClear;
   Rectangle(Rect.Left,Rect.Top,Rect.Left+100,Rect.Bottom);

   Brush.Style:=bsClear;
   Font.Color:=clBlue;
   TextOut(Rect.Left+110,Rect.Top,IntToStr(index));
  end;
end;

end.
