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

# TDockManager.PositionDockRect

Determines the DockRect while dragging a control over the docksite.

## Declaration

Source position: controls.pp line 678

`public procedure TDockManager.PositionDockRect(`
`ADockObject: TDragDockObject`
`); virtual; overload; procedure TDockManager.PositionDockRect(`
`Client: TControl;`
`DropCtl: TControl;`
`DropAlign: TAlign;`
`var DockRect: TRect`
`); virtual; abstract; overload;`

## Arguments

`ADockObject` |  | The DragDockObject holding all information about the drag-dock operation.

## Arguments

`Client` |  | The dropped control.
`DropCtl` |  | The control relative to which Client shall be docked; Nil for docking into the docksite.
`DropAlign` |  | How to dock, relative to DropCtl.
`DockRect` |  | The screen rectangle of the docksite, to be adjusted by this method.

## Description

This method updates DockRect to provide visual feedback when a control is dragged over the docksite. The initial DragDockObject.DockRect spans the entire DockSite.

The Delphi-compatible version only can use the parameters determined by the default processing in the docksite.

The Lazarus version can update the DockObject with better-suited parameters. A DockManager here can implement any algorithm for the placement of a dropped control. The default implementation calls the Delphi compatible version. When you override the Lazarus version, you may have to determine the dock sibling and DropAlign again, when the default determination (in TControl and TWinControl) is inappropriate.

## See also

TDragDockObject |  | A drag object for drag-dock.