procedure TForm1.DBGrid1DrawColumnCell(Sender: TObject; const Rect: TRect;
DataCol: Integer; Column: TColumn; State: TGridDrawState);
begin
if Column.Field.FieldName='F01' then
begin
with (Sender as TDBGrid).Canvas do
begin
FillRect(Rect);
Font.Color:=CLRED;
TextOut(Rect.Left+3,Rect.Top+3, Copy('000000'+Trim(Column.Field.AsString), Length('000000'+Trim(Column.Field.AsString))-5, 6));
end;
end;
end;