procedure TMainForm.ListView1CustomDrawItem(Sender: TCustomListView; Item: TListItem; State: TCustomDrawState; var DefaultDraw: Boolean); begin if Item.Caption = 'aaa' then //加上条件 (Sender as TListView).Canvas.Font.Color := clMaroon else (Sender as TListView).Canvas.Font.Color := clRed; end;
Item: TListItem; State: TCustomDrawState; var DefaultDraw: Boolean);
begin
if Item.Caption = 'aaa' then //加上条件
(Sender as TListView).Canvas.Font.Color := clMaroon
else
(Sender as TListView).Canvas.Font.Color := clRed;
end;