Konuyu kapatmıştım ama son gördüğüm örnek dikkatimi çekti. Aşağıdaki örnekte Fmx te stringgridin içindeki bilgiye göre hücre rengi değiştiriliyor. Fakat sorun tek bir hücre değil bütün kolon veya satırın rengi değişiyor. Sadece tek bir hücrenin rengini nasıl değiştiririm.
procedure TForm1.StringGrid1DrawColumnCell(Sender: TObject; const Canvas: TCanvas; const Column: TColumn; const Bounds: TRectF; const Row: Integer; const Value: TValue; const State: TGridDrawStates); var aRowColor: TBrush; aNewRectF: TRectF; begin aRowColor := TBrush.Create(TBrushKind.Solid, TAlphaColors.Alpha); if (StringGrid1.Cells[1, Row] = '1') then aRowColor.Color := TAlphaColors.Green else aRowColor.Color := TAlphaColors.Red; aNewRectF := Bounds; // aNewRectF.Inflate(3, 3); Canvas.FillRect(aNewRectF, 0, 0, [], 1, aRowColor); Column.DefaultDrawCell(Canvas, Bounds, Row, Value, State); aRowColor.free; end;