So mache ich das in meinen Programmen:
Delphi-Quellcode:
procedure TVerForm.ListViewCustomDrawItem(Sender: TCustomListView;
Item: TListItem; State: TCustomDrawState; var DefaultDraw: Boolean);
var
condition: boolean;
begin
inherited;
condition := ... ;
if condition
then with Sender.Canvas.Font do Color := clMaroon
else with Sender.Canvas.Font do Color := clBlack;
end;
Grüße vom marabu
Überflüssiges then entfernt