I’m trying to use assign on a TPanel configured in the designer but it doesn’t work.
LPanel : TPanel;
LPanel := TPanel.Create(nil);
LPanel.Assign(Panel1); // Panel1 is a panel made in the form designer
The error message is something like “TPanel cannot be assigned to TPanel.” (I have the german version of RAD Studio… The exact error message on german is “TPanel kann nicht zu TPanel zugewiesen werden.”)
I designed a TPanel with other components in it using the Form Designer. Now I want to add new TPanel instances to a TLayout which should be the same as the TPanel I want to assign from, including all child controls.