[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] Reference for unit 'Controls' (#lcl)

TControl.DoDock

Adjust the control's position and extent for the new docksite.

Declaration

Source position: controls.pp line 1133

protected procedure TControl.DoDock(

  NewDockSite: TWinControl;

  var ARect: TRect

); virtual;

Description

If NewDockSite=Nil, Parent is set to Nil (in preparation of floating the control).

Otherwise ARect is adjusted to fit into the logical ClientRect of the NewDockSite. The origin is adjusted according to Align[??? should be DropAlign!], so that the control sits at the according side of the NewDockSite.

Finally the computed coordinates are stored, in BoundsRectForNewParent when the NewDockSite differs from Parent, else in BoundsRect.

ARect is the perfect BoundsRect for the control, in screen coordinates when it becomes floating, or in client coordinates of the target docksite.

The latest version of this document can be found at lazarus-ccr.sourceforge.net.