Delphi-Quellcode:
procedure TForm1.ListBox1DrawItem(Control: TWinControl; Index: Integer;
Rect: TRect; State: TOwnerDrawState);
Var lb: TListBox;
begin
lb := Control As TListBox;
lb.Canvas.TextOut(Rect.Left,Rect.Top,lb.Items[Index]);
lb.Canvas.Pen.Color := clred;
lb.Canvas.MoveTo(Rect.Left,Rect.Bottom-1);
lb.Canvas.LineTo(Rect.Right,Rect.Bottom-1);
end;
ListBox.Style noch auf lbOwnerDrawFixed setzen.
Gruß, teebee