晚上好,我想知道如何在写入数据时更改单元格的颜色
我有这个...
procedure TFrmReportes.SGDrawCell(Sender: TObject; ACol,ARow: Integer;
Rect: TRect; State: TGridDrawState);
begin
if (gdSelected in State) then
begin
SG.Canvas.Brush.Color := rgb(255,119,119);
SG.Canvas.FillRect(SG.CellRect(ACol,ARow));
SG.Canvas.TextOut(Rect.Left+2,Rect.Top+2,SG.Cells[ACol,ARow]);
end;
end;
但是在单元格中输入数据时,它变成白色
再次感谢!