Delphi FMX Grid Renklendirme
Delphi Firemonkey string grid renklendirme kodu
procedure TForm.StringGrid1DrawColumnCell(Sender: TObject;
const Canvas: TCanvas; const Column: TColumn; const Bounds: TRectF;
const Row: Integer; const Value: TValue; const State: TGridDrawStates);
begin
aRowColor := TBrush.Create(TBrushKind.Solid, TAlphaColors.Alpha);
if Sartim > 0 then
aRowColor.Color := TAlphaColorRec.Aqua
else
if Sartim = 0 Then
ARowColor.Color := TAlphaColorRec.Lime
else
if Sartim < 0 then
aRowColor.Color := TAlphaColorRec.Aliceblue;
aNewRectF := Bounds;
aNewRectF.Inflate(3, 3);
Canvas.FillRect(aNewRectF, 0, 0, [], 1, aRowColor);
Column.DefaultDrawCell(Canvas, Bounds, Row, Value, State);
aRowColor.free;
end;