Witam
Mam taki kodzik i moje pytanie jest jak zrobić aby w StringGrid gdy wartość kolumny 4 jest < od 50 podświetlić wiersze na czerwono
procedure TForm4.StringGrid1DrawCell(Sender: TObject; ACol, ARow: Integer;
Rect: TRect; State: TGridDrawState);
begin
if (Acol mod 4 <=5 ) and (Arow <=5) then
with TStringGrid(Sender) do
begin
//paint the background Green
Canvas.font.Color := clRed;
Canvas.FillRect(Rect);
Canvas.TextOut(Rect.Left+2,Rect.Top+2,Cells[ACol, ARow]) ;
end;