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

# TControl.ManualFloat

Undocks the control into a floating dock site.

## Declaration

Source position: controls.pp line 1616

`public function TControl.ManualFloat(`
`TheScreenRect: TRect;`
`KeepDockSiteSize: Boolean = True`
`):Boolean; virtual;`

## Arguments

`TheScreenRect` |  | The screen area where the floating control is moved; or the client area for a floating host site.
`KeepDockSiteSize` |  | True if the undocked control keeps its docked dimensions. The default value is True.

## Function result

True if successfully floated.

## Description

ManualFloat is a Boolean function used to undock the control. It undocks the control from the HostDockSite (when assigned) found in the control or in its Parent.

For TControl, which does not have a handle, a floating host dock site where the control can be docked is created. TWinControl has a handle and can float without any assistance.

The Dock method is called to dock the control to the new floating dock site.

The return value is True if the control was successfully undocked and re-docked to a floating dock site.

## See also

TControl.Parent |  | The control within which the control is shown.
TControl.HostDockSite |  | The host site (TWinControl) into which this control is docked. Nil if not docked.
TControl.CreateFloatingDockSite |  | Create a floating dock site with a client area equal to the given screen coordinates.
TControl.Dock |  | Moves the control into a new docksite.
TWinControl.DoUndock |  | Notifies an OnUnDock handler and the DockManager of an undocked client control.
TWinControl.DoUndockClientMsg |  | Notifies the DockManager of the undock of a client control.