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


Get your own web address for just $1.99/1st yr. We'll help. Yahoo! Small Business.

Reply via email to