PageControl

Delphi

29/07/2003

Como inserir novas páginas em um PageCOntrol em tempo de execução.


Fabio Colli

Fabio Colli

Curtidas 0

Respostas

Motta

Motta

29/07/2003

no help tem um exemplo veja

TTabSheet.Create


GOSTEI 0
Alane

Alane

29/07/2003

este exemplo é do próprio help do Delphi

This example dynamically creates a Page Control, then a series of Tab Sheets on the Page Control.

procedure TForm1.FormCreate(Sender: TObject);

const
TabTitles: array[0..3] of ShortString = (´Customer´, ´Orders´, ´Items´, ´Parts´ );
var
i: Integer;
PageControl1: TPageControl;
begin
PageControl1 := TPageControl.Create(Self);
PageControl1.Parent := Self;
PageControl1.Align := alClient;
for i := Low(TabTitles) to High(TabTitles) do
with TTabSheet.Create(PageControl1) do
begin
PageControl := PageControl1;

Name := ´ts´ + TabTitles[i];
Caption := TabTitles[i];
end;
end;

espero que vc entenda e isto tenha ajudado.


GOSTEI 0
POSTAR