var Groupbox1:TGroupbox; edit1:Tedit; Begin Groupbox1:=TGroupbox.create(self); Groupbox1.caption:='Groupbox1'; Groupbox1.Name:='Groupbox1'; Groupbox1.LEFT:=100; Groupbox1.TOP:=100;
例: var i:integer; myedit:array of TEdit; begin setlength(myedit,10); for i:=0 to 9 do begin myedit[i]:=TEdit.Create(self); myedit[i].parent=panel1; myedit[i].left=... ...... end; end;
同意: siyu2002 procedure TForm1.FormCreate(Sender: TObject); VAr a:TGroupBox; b: TButton; begin a:=TGroupBox.Create(self); a.Parent:=self; a.Left:=80; a.Top:=60; a.width:=100; a.height:=100; b:=TButton.Create(self); b.Parent:=a;
Groupbox1:TGroupbox;
edit1:Tedit;
Begin
Groupbox1:=TGroupbox.create(self);
Groupbox1.caption:='Groupbox1';
Groupbox1.Name:='Groupbox1';
Groupbox1.LEFT:=100;
Groupbox1.TOP:=100;
Edit1:=Tedit1.create(self);
edit1.caption:='edit1';
edit1.name:='edit1';
edit1.LEFT:=100;
edit1.TOP:=100;
edit1.bringtofront;
end;
你说的那个到是好解决!
VAr
a:TGroupBox;
b: TButton;
begin
a:=TGroupBox.Create(self);
a.Parent:=self;
a.Left:=80;
a.Top:=60;
b:=TButton.Create(self);
b.Parent:=a;
end;
var
i:integer;
myedit:array of TEdit;
begin
setlength(myedit,10);
for i:=0 to 9 do
begin
myedit[i]:=TEdit.Create(self);
myedit[i].parent=panel1;
myedit[i].left=...
...... end;
end;
procedure TForm1.FormCreate(Sender: TObject);
VAr
a:TGroupBox;
b: TButton;
begin
a:=TGroupBox.Create(self);
a.Parent:=self;
a.Left:=80;
a.Top:=60;
a.width:=100;
a.height:=100;
b:=TButton.Create(self);
b.Parent:=a;
b.Left:=80;
b.Top:=60;
b.width:=100;
b.height:=100;
end;