Unit 'Controls' Package
[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] [#lcl]


Moves the control into a new docksite.


Source position: controls.pp line 1543

public procedure TControl.Dock(

  NewDockSite: TWinControl;

  ARect: TRect

); virtual;




The host site into which which the control is to be docked, Nil for floating.



The new Bounds for the control. Expressed in screen coordinates when NewDockSite is Nil. Otherwise, client coordinates for NewDockSite.


Calls DoDock to prepare for the new position of the control, when docked into an unmanaged or floating docksite.

When the old and new docksites are different, the control is removed from the DockClients of the old docksite, and added to the DockClients of the new docksite; afterwards the docksites are notified by calling their DoAddDockClient and DoRemoveDockClient methods, to adjust the control's Parent.


An exception is raised if there is already a docking process in progress for this control.

CT Web help

CodeTyphon Studio