Ver Mensaje Individual
  #2  
Antiguo 07-05-2003
Avatar de delphi.com.ar
delphi.com.ar delphi.com.ar is offline
Federico Firenze
 
Registrado: may 2003
Ubicación: Buenos Aires, Argentina *
Posts: 5.933
Reputación: 27
delphi.com.ar Va por buen camino
Podés crear tu propio componente similar a esto....
Código:
type
  TMyDBEdit = class(TDBEdit)
  private
    FAlignment: TAlignment;
    procedure SetAlignment(const Value: TAlignment);
  protected
    procedure CreateParams(var Params: TCreateParams); override;
  public
  published
    property Alignment : TAlignment read FAlignment write SetAlignment default taLeftJustify;
  end;

implementation

procedure TMyDBEdit.CreateParams(var Params: TCreateParams);
const
  Alignments: array[TAlignment] of Longint = (ES_LEFT, ES_RIGHT, ES_CENTER);
begin
  inherited CreateParams(Params);
  Params.Style := Params.Style or Alignments[FAlignment];
end;

procedure TMyDBEdit.SetAlignment(const Value: TAlignment);
begin
  if FAlignment <> Value then begin
    FAlignment := Value;
    RecreateWnd ;
  end;
end;
Creo que no me olvidé de nada, Suerte!
__________________
delphi.com.ar

Dedique el tiempo suficiente para formular su pregunta si pretende que alguien dedique su tiempo en contestarla.
Responder Con Cita