[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] |
Remove a previously docked control and put a new control in its place
Source position: controls.pp line 1259
public function TControl.ReplaceDockedControl( |
Control: TControl; |
NewDockSite: TWinControl; |
DropControl: TControl; |
ControlSide: TAlign |
):Boolean; |
Control |
|
The old control that was previously docked at this site |
NewDockSite |
|
The new site for docking; used if DropControl is nil |
DropControl |
|
The control site to be used for docking, unless it is nil when it is igored. Passed straight through as an argument to ManualDock |
ControlSide |
|
The side to which the new control is to be aligned; passed straight through as an argument to ManualDock |
Returns True if a docked control has been successfully replaced with a new one
This method works only when the control to replace resides in a managed docksite (using an DockManager), or is not docked at all. Even then exist situations where it won't work as expected, depending on the used DockManager and other subtle conditions.
When the control to replace is docked, then it's replaced by this control; otherwise this control becomes floating (seems to be a design flaw).
Finally the control to replace is docked into NewDockSite, according to DropControl and ControlSide (see TControl.ManualDock).
This method primarily exists for use by the DockManager itself, for NoteBook docking. It should not be used in application code.
|
Docks a control programmatically. |
lazarus-ccr.sourceforge.net |