procedure TFormAlissaA.ListViewAAdvancedCustomDrawItem(Sender: TCustomListView; Item: TListItem; State: TCustomDrawState; Stage: TCustomDrawStage; var DefaultDraw: Boolean);
begin
if Item.SubItems[0] = 'Send' then
begin
Sender.Canvas.Font.Color := clWindowText;
Sender.Canvas.Font.Name := '宋体';
Sender.Canvas.Font.Size := 12;
Sender.Canvas.Brush.Color := $d0d0f2;
end
else if Item.SubItems[0] = 'Recv' then
begin
Sender.Canvas.Font.Color := clWindowText;
Sender.Canvas.Font.Name := '宋体';
Sender.Canvas.Font.Size := 12;
Sender.Canvas.Brush.Color := $e6c8c8;
end
end;
标签:Canvas,Font,Sender,Item,Color,Delphi,begin,item,Listview
From: https://www.cnblogs.com/YXGust/p/16593145.html