Código Delphi
[-]ComboBox1.Style := csCenter;
Código Delphi
[-]procedure TForm1.DBGrid1DrawColumnCell(Sender: TObject; const Rect: TRect;
DataCol: Integer; Column: TColumn; State: TGridDrawState);
var
s: string;
x, y: Integer;
begin
if Column.Field.DataType = ftCurrency then
begin
s := '$' + Column.Field.AsString;
x := Rect.Right - Canvas.TextWidth(s) - 2;
y := Rect.Top + 2;
DBGrid1.Canvas.TextRect(Rect, Rect.Left + 2, Rect.Top + 2, '$');
DBGrid1.Canvas.TextRect(Rect, x, y, s);
end
else
DefaultDrawColumnCell(Rect, DataCol, Column, State);
end;