I have a TAdvStringGrid linked to virtual data in a TObjectList. I attached a GetCellColor event and in there check a flag for the row's data record and change the font color accordingly. This works. However the selected cell color is not affected.
How can I change a cell's selected and non-selected font color based on virtual data?
My exact code:
procedure TMainForm.AdvStringGrid1GetCellColor(Sender: TObject; ARow,
ACol: Integer; AState: TGridDrawState; ABrush: TBrush; AFont: TFont);
begin
if ARow > 0 then
if not FNewRequest.CanReturnHistory(ARow - 1) then
AFont.Color := clLtGray;
end;