unit main_fr;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, fr0, fr1, fr2, fr3, Borland.Vcl.Menus, System.ComponentModel,
Borland.Vcl.StdCtrls, Borland.Vcl.ComCtrls;
type
Tmain_form =
class(TForm)
MainMenu1: TMainMenu;
Start1: TMenuItem;
test1: TMenuItem;
//Dies hier ist der Auslöser zum Einbinden der Frames
Forschung1: TMenuItem;
PageControl1: TPageControl;
procedure test1Click(Sender: TObject);
procedure FormCreate(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
main_form: Tmain_form;
implementation
{$R *.nfm}
var
fr :
array[0..3]
of TFrame;
procedure Tmain_form.test1Click(Sender: TObject);
var
p : TTabSheet;
i : integer;
begin
for i := 0
to 3
do
begin
p := TTabSheet.Create(PageControl1);
p.PageControl := PageControl1;
p.
Name := '
nummer_' + IntToStr(i);
p.Caption := '
caption_' + IntToStr(i);
p.Show;
fr[i].parent := p;
fr[i].Show;
end;
end;
procedure Tmain_form.FormCreate(Sender: TObject);
begin
fr[0] := fr0.TFrame1.Create(self);
fr[1] := fr1.TFrame4.Create(self);
fr[2] := fr2.TFrame5.Create(self);
fr[3] := fr3.TFrame6.Create(self);
end;
end.