Voila
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, ComCtrls;
type
TForm1 = class(TForm)
PageControl1: TPageControl;
TabSheet1: TTabSheet;
procedure FormActivate(Sender: TObject);
private
{ Déclarations privées }
public
PageControl: TPageControl;
TabSheet : TTabSheet;
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.FormActivate(Sender: TObject);
begin
//Création dynamique du page control
PageControl1:=TPageControl.Create(self);
with PageControl1 do begin
parent:=form1;
Align:=alclient;
end;
//Création dynamique du Tabsheet (ton fameux "TPage")
TabSheet1:=TTabSheet.Create(self);
with TabSheet1 do begin
PageControl:=PageControl1;
Caption:='Onglet 1';
end;
end;
end.