I'm belatedly fixing a couple of projects that I find refer to TNotebook.
Using TNotebook, one can insert and delete pages on the fly using code like
WITH Hp495xSpoofForm.Notebook1) DO BEGIN
Pages.Insert(i, 'Port ' + IntToStr(i + 1));
TPage(Pages.Objects[i]).InsertControl(TFrameSpoofResponder.Create(Hp495xSpoofForm),
0)
END;
Hp495xSpoofForm.Notebook1.Pages.Delete(i);Is there an "approved" way to do this with TPageControl? I see from the online info that one can cast to a TCustomNotebook to access .Pages as a TStrings, but is this safe in the long term or will TCustomNotebook go the way of TNotebook?
I notice that
http://lazarus-ccr.sourceforge.net/docs/lcl/comctrls/tpagecontrol.html has property Pages: TTabSheet; while the comctrls.pas has property Pages[Index: Integer]: etc. Doesn't help much.
