Chad Crabtree <[EMAIL PROTECTED]> wrote:
What have you tried? Some example code is necessary.
Hi Chad,
Already supplied a sample sometime ago:
---------------------------------------------------------------------------------
Hi,
I'm creating tabsheets at runtime:
-------------------------------------------------------------
with TTabSheet.Create(PageControl1) do
begin
PageControl := PageControl1;
Caption := Title;
Enabled := True;
with TMemo.Create(Self) do
begin
Parent := PageControl1.ActivePage;
Align := alClient;
Enabled := True;
WantTabs := True;
end;
end;
------------------------------------------------------
That works fine but destroying the tabsheets is the problme:
J := PageControl1.ActivePageIndex;
PageControl1.ActivePage:=PageControl1.FindNextPage(PageControl1.ActivePage,False,False);
PageControl1.Pages[J].Free;
Simply it does not work. The memo disappears but the tabsheet with its title stays.
Am I doing it wrong or is it a bug in the TPageControl.TTabSheet? Any ideas /suggestions please?
Thanks.
Rad
-------------------------------------------------------------
Cheap Talk? Check out Yahoo! Messenger's low PC-to-Phone call rates.