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

# TDockManager.SetReplacingControl

Specifies the control to be replaced subsequently.

## Declaration

Source position: controls.pp line 684

`public procedure TDockManager.SetReplacingControl(`
`Control: TControl`
`); virtual;`

## Arguments

`Control` |  | The control to be replaced later.

## Description

This method is called by ReplaceDockedControl, to announce a pending replacement of Control by another control. The next RemoveControl should be ignored, and InsertControl should only exchange the controls, without reorganizing the layout of the docksite. When Control is Nil, this call signals the end of the exchange [obsolete].

Remark: | The name "SetReplacingControl" is a misnomer, it should read "SetControlToBeReplaced".

The intended purpose of this method is the replacement of a docked control by a Notebook, preserving the DockZone. This operation should be handled by an DockManager internally, and calls to this method should be ignored.

## See also

TDockManager.InsertControl |  | Position DropCtl relative Control, using the alignment specified by InsertAt.
TDockManager.RemoveControl |  | Removes the undocked control from the docksite layout.