procedure TForm1.DBGrid1DrawColumnCell(Sender: TObject; const Rect: TRect; DataCol: Integer; Column: TColumn; State: TGridDrawState); begin //売上がマイナスなら赤く表示 if (Column.FieldName = 'URIAGE') and (Column.Field.AsCurrency < 0) then DBGrid1.Canvas.Font.Color := clRed;
//描画 DBGrid1.DefaultDrawColumnCell(Rect,DataCol,Column,State);
end;
|