Hello General,
As I can not post in not mine bugs I'll add the comment here:
The code does not perform the right job because the parent is changed but not the owner. I think that InsertControl should take care of this (AKA .Parent:=), so instead the user code this one will work as expected:
while Instance.ComponentCount > 0 do begin
Ctrl:=Instance.Components[0];
Instance.RemoveComponent(Ctrl); //Removes owner control.
AParent.Owner.InsertComponent(Ctrl); //Forces the owner change.
if Ctrl Is TControl then AParent.InsertControl(TControl(Ctrl));
end;Best regards,
JoshyFun
