Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   GUI-Design mit VCL / FireMonkey / Common Controls (https://www.delphipraxis.net/18-gui-design-mit-vcl-firemonkey-common-controls/)
-   -   Delphi Page Control (https://www.delphipraxis.net/31226-page-control.html)

Joergie 6. Okt 2004 10:30


Page Control
 
Hallo, ich erzeuge eine Dynamisch page control und setze nacheinander einzelne Seiten auf der.
Wie kann ich die gerade ausgewählte Seite (TapSheet) wieder löschen?

toms 6. Okt 2004 10:39

Re: Page Control
 
Hi,

So geht's:
Delphi-Quellcode:
Pagecontrol1.ActivePage.Free;

ipworks 6. Okt 2004 11:39

Re: Page Control
 
Sers,
hier das Erstellen von TTabSheets

Delphi-Quellcode:
//...
const
....
var
mynewtab: TTabSheet;
x: integer;
begin
    mynewtab:=TTabSheet.Create(Self);
    mynewtab.PageControl := PageControl1;
    mynewtab.name:=smc(Listview2.Items[cindex].caption);
    ....
end;
Und die Freigabe:

Delphi-Quellcode:
     with TTabSheet(FindComponent({Name der Komponenten})) do free;
Hoffe es hilft...

Das Erstellen der TPageControl geht analog zur Erstellen der TabSheets, nur die properties müssen natürlich anders gesetzt werden...
have fun with the details... :-D
Peter

ipworks 6. Okt 2004 11:41

Re: Page Control
 
Oooops..sorry

war ein Ausschnitt aus meinem Code...
...muss heissen:
Delphi-Quellcode:
//...
const
....
var
mynewtab: TTabSheet;
x: integer;
begin
    mynewtab:=TTabSheet.Create(Self);
    mynewtab.PageControl := PageControl1;
    mynewtab.name:={Name};
    ....
end;


Alle Zeitangaben in WEZ +1. Es ist jetzt 10:07 Uhr.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz