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

# TDockManager.InsertControl

Position DropCtl relative Control, using the alignment specified by InsertAt.

## Declaration

Source position: controls.pp line 672

`public procedure TDockManager.InsertControl(`
`ADockObject: TDragDockObject`
`); virtual; overload; procedure TDockManager.InsertControl(`
`Control: TControl;`
`InsertAt: TAlign;`
`DropCtl: TControl`
`); virtual; abstract; overload;`

## Arguments

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

## Arguments

`Control` |  | The control relative to which insert.
`InsertAt` |  | How to insert relative to Control.
`DropCtl` |  | The control to insert.

## Description

InsertControl determines the placement of the just docked control, forcing a repaint of the container control if necessary.

Remark: | When SetReplacingControl has been called with a non-Nil Control before, the dropped control only should replace that control.

An overloaded version passes the DragDockObject to the dockmanager, allowing to pass more information about the drop. It allows one to implement other than tree-style docksites.

## See also

TDockManager.RemoveControl |  | Removes the undocked control from the docksite layout.