As we all know, TPanel
is a container for other visual components (TLabel
, TEdit
etc).
However, it seems that we can place only new components (from the
component palette) onto an existing TPanel and the VCL framework will then automatically make the TPanel their parent).
I wonder if there's a way to place existing visual components (those that are already on our VCL form) onto a TPanel. I've tried
Placing components on an existing TPanel (this doesn't work because the framework will not make the TPanel their parent)
Manually editing the form's dfm file (the components on the TPanel are now invisible -- a bug?)
Explicitly setting a component's Parent property in code (
Label1
is visible even whenPanel1
height is set to 0)Label1->Parent = Panel1;
Neither of the above worked but this seems to be such a basic thing that it has to be a way to do this.
Thank you