RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TControl.ReplaceDockedControl Method

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

Pascal
function ReplaceDockedControl(Control: TControl; NewDockSite: TWinControl; DropControl: TControl; ControlSide: TAlign): Boolean;
C++
__fastcall Boolean ReplaceDockedControl(TControl * Control, TWinControl * NewDockSite, TControl * DropControl, TAlign ControlSide);

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. 

 

Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!