From RAD Studio API Documentation
Jump to: navigation, search


function ReplaceDockedControl(Control: TControl; NewDockSite: TWinControl;
DropControl: TControl; ControlSide: TAlign): Boolean;


bool __fastcall ReplaceDockedControl(TControl* Control, TWinControl* NewDockSite, TControl* DropControl, TAlign ControlSide);


Type Visibility Source Unit Parent
function public
Vcl.Controls TControl


Docks the control in the place where another control is already docked.

Call ReplaceDockedControl to replace a control that is already docked while moving that control to another dock site.

Control is the control whose place this control is taking.

NewDockSite is the new dock site for the control that is replaced.

DropControl is a control in the new dock site on which to drop the control that is replaced. For example, if NewDockSite were a page control, DropControl would be a tab sheet.

ControlSide specifies on which side of DropControl or NewDockSite (if DropControl is nil (Delphi) or NULL (C++)) the replaced control should be docked. This value can be obtained by calling the dock site's GetDockEdge method.

ReplaceDockedControl does the same thing as calling the ManualDock method of the control specified by the Control parameter (using the values of NewDockSite, DropControl, and ControlSide) in addition to calling ManualDock for the control whose method this is, docking it in the current position of the Control parameter. However, calling ReplaceDockedControl is more efficient, and prevents unnecessary flicker.

See Also