I have been looking for how to create multiple tabsheet where for every tabsheet I created has the same components therein. I understand how to create a new tabsheet, but what I need is to make tabsheet and all their child components.
I have tried to create an instance of the TForm and stick the TForm into tabsheet, but only these forms are attached to tabsheet. Not with their child components.
This is my programing code:
procedure TmPenjualan.Button1OnClick(Sender: TObject);
var
Tab: TTabSheet;
FormT: TForm;
FrameT: TFrame;
begin
Tab := TTabSheet.Create(PageControlParent);
Tab.PageControl := PageControlParent;
FormT := TForm1.CreateNew(Tab);
FormT.Parent := Tab;
FormT.Show;
end;
If I was wrong, please help me with specific sample code. Thanks in advance