Cita:
Empezado por mmtaffarel
...como puedo hacer para crear en tiempo de ejecucion un formulario, agregarle un groupbox y a su vez dentro de este varios edits??? todo en tiempo de ejecucion...
|
Bueno el sistema es sencillo y parecido para todos los controles; Aquí tienes un ejemplo, puedes además modificar todaslas propiedades inicialmente que te interesen.
Código Delphi
[-]
var
F:TForm;
gb:TGroupBox;
lbl1:TLAbel;
edt1:TEdit;
begin
F := TForm.Create(Application);
F.Name := 'RunTimeForm1';
F.Position := poDesktopCenter;
F.Width := 600;
F.Height := 400;
F.Show;
gb := TGroupBox.Create(F);
gb.Parent := F;
gb.Name := 'RunTimeGroupBox1';
gb.Top := 10;
gb.Left := 10;
gb.Height := 300;
gb.Width := 300;
lbl1 := TLabel.Create(F);
lbl1.Parent := gb; lbl1.Name := 'RunTimeLabel1';
lbl1.Top := 40;
lbl1.Left := 40;
lbl1.Width := 100;
lbl1.Caption := 'Etiqueta: ';
edt1 := TEdit.CReate(F);
edt1.Parent := gb; edt1.Name := 'RunTimeEdit1';
edt1.Top := 40;
edt1.Left := 160;
edt1.Width := 100;
Edt1.Text := 'Escriba aquí...';