diff --git a/components/anchordocking/anchordocking.pas b/components/anchordocking/anchordocking.pas index 72b4cb0ac2..85008de0c2 100644 --- a/components/anchordocking/anchordocking.pas +++ b/components/anchordocking/anchordocking.pas @@ -1080,6 +1080,28 @@ begin result:=Nil; end; +function ReturnAnchoredControlsSize(Control: TControl; Side: TAnchorKind): integer; +var + i: Integer; + Neighbour: TControl; +begin + result:=high(integer); + for i:=0 to Control.AnchoredControlCount-1 do begin + Neighbour:=Control.AnchoredControls[i]; + if Neighbour.Visible then + if Neighbour is TAnchorDockHostSite then + if (OppositeAnchor[Side] in Neighbour.Anchors) + and (Neighbour.AnchorSide[OppositeAnchor[Side]].Control=Control) then begin + case Side of + akTop,akBottom: if Neighbour.ClientHeight