diff --git a/components/anchordocking/anchordocking.pas b/components/anchordocking/anchordocking.pas index 5d62f53a72..034b2854d3 100644 --- a/components/anchordocking/anchordocking.pas +++ b/components/anchordocking/anchordocking.pas @@ -4337,6 +4337,18 @@ begin ParentSite.BeginUpdateLayout; DisableAutoSizing; try + for i := ControlCount - 1 downto 0 do begin + Child := Controls[i]; + if Child.Owner <> Self then + begin + Child.Parent := ParentSite; + Child.SetBounds(Child.Left + Left, Child.Top + Top, Child.Width, Child.Height); + for Side := Low(TAnchorKind) to High(TAnchorKind) do + if Child.AnchorSide[Side].Control = Self then + Child.AnchorSide[Side].Assign(AnchorSide[Side]); + end; + end; +{ was : i:=0; while i