type
TEditEx = class(TEdit)
protected
procedure CreateParams(var Params: TCreateParams);
override;
end;
{ TEditEx }
procedure TEditEx.CreateParams(var Params: TCreateParams);
begin
inherited;
Params.Style := Params.Style or ES_RIGHT;
end;
procedure TForm1.FormCreate(Sender: TObject);
begin
with TEditEx.Create(Self) do
begin
Parent := Self;
//Left
//Top
end;
end;