Ver Mensaje Individual
  #7  
Antiguo 01-03-2007
Avatar de dec
dec dec is offline
Moderador
 
Registrado: dic 2004
Ubicación: Alcobendas, Madrid, España
Posts: 13.107
Reputación: 34
dec Tiene un aura espectaculardec Tiene un aura espectacular
Hola,

Con el siguiente código creamos un "PageControl" y varios "TTabSheet":

Código Delphi [-]
procedure TForm1.Button1Click(Sender: TObject);
var
  i: integer;
  ts: TTabSheet;
  pc: TPageControl;
begin
  // Creamos un PageControl
  pc := TPageControl.Create(Self);
  pc.Parent := Self;
  pc.SetBounds(10, 10, 400, 300);

  // Y luego 5 nuevas pestañas
  for i := 1 to 5 do
  begin
    ts := TTabSheet.Create(Self);
    ts.PageControl := pc;
    ts.Caption := 'Pestaña '+IntToStr(i);
  end;

end;
__________________
David Esperalta
www.decsoftutils.com
Responder Con Cita