代码如下:
procedure TMAINFORM.DataGridCustomDrawCell(Sender: TObject; ACanvas: TCanvas; ARect: TRect; ANode: TTreeListNode; AColumn: TTreeListColumn; ASelected, AFocused, ANewItemRow: Boolean; var AText: string; var AColor: Integer; AFont: TFont; var AAlignment: TAlignment; var ADone: Boolean);
begin
// if (DataSetBrokerLM.DataSet.Active) and (TDataGridColumn(AColumn).ColumnDef.Field.DataSet.FieldByName('sc')='1') then
if ASelected or AFocused then
begin
ACanvas.Font.Color := Business.System.Graphics.clblack;
ACanvas.Brush.Color := Business.System.Graphics.clred;
ACanvas.Font.Size := 9;
ACanvas.Font.Name := '宋体';
end;
end;