unit UFHeritDynamic;

interface

uses
  SysUtils, Classes, QGraphics, QControls, QForms, QDialogs,
  QStdCtrls;

type
  TForm1 = class(TForm)
   Label1: TLabel;
   procedure FormMouseDown(Sender: TObject; Button: TMouseButton;
     Shift: TShiftState; X, Y: Integer);
  private
   { Déclarations privées }
  public
   { Déclarations publiques }
  end;
  TMonEdit=class(TEdit)
  public
    constructor Create(AOwner: TComponent); override;
  end;

var
  Form1: TForm1;

implementation

{$R *.dfm}
constructor TMonEdit.Create(AOwner: TComponent);
begin
  inherited ;
  color:=clyellow;
  width:=130;
  font.Name:='Times New Roman';
  font.Size:=18;
  Text:='Nouvel Edit'
end;

procedure TForm1.FormMouseDown(Sender: TObject; Button: TMouseButton;
  Shift: TShiftState; X, Y: Integer);
var
MonEdit:TMonEdit;
begin
MonEdit:=TMonEdit.create(Form1);
MonEdit.Top:=Y;
MonEdit.Left:=X;
MonEdit.parent:=Form1;
end;

end.