Author: Tomas Rutkauskas
How to change the font color of a specific row in a TListView
Answer:
Use the events OnCustomDrawItem and OnCustomDrawSubItem:
1 2 procedure TForm1.ListView1CustomDrawItem(Sender: TCustomListView;
3 Item: TListItem; State: TCustomDrawState; var DefaultDraw: Boolean);
4 begin5 if (Item.Index mod 2) = 0 then6 Sender.Canvas.Font.Color := clRed
7 else8 Sender.Canvas.Font.Color := clBlack;
9 end;