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

TControl.Dock

Moves the control into a new docksite.

Declaration

Source position: controls.pp line 1619

public procedure TControl.Dock(

  NewDockSite: TWinControl;

  ARect: TRect

); virtual;

Arguments

NewDockSite

  

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

ARect

  

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

Description

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.

Errors

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


Version 3.2 Generated 2024-02-25 Home