procedure TForm1.Button1Click(Sender: TObject);
var
NewPage: TWinControl;
begin
TabbedNotebook1.Pages.Add(Edit1.Text);
NewPage := TabbedNotebook1.Pages.Objects[TabbedNotebook1.Pages.Count - 1]
as TWinControl;
with TLabel.Create(Self) do
begin
Left := 20;
Top := 20;
Caption := '&Телефон: ';
Parent := NewPage;
end;
with TEdit.Create(Self) do
begin
Left := 100;
Top := 20;
Text := '1-800-555-1212';
Parent := NewPage;
end;
end;
|