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

# TWinControl.OnUnDock

Event handler signalled before a control is undocked from its DockSite.

## Declaration

Source position: controls.pp line 2352

`public property TWinControl.OnUnDock : TUnDockEvent read FOnUnDock write FOnUnDock;`

## Description

OnUnDock is a TUnDockEvent property with the event handler signalled before a control is undocked from its DockSite. The event handler arguments identify the control with the DockSite, the client control which will become undocked, the control that has the new dock site, and a Boolean which indicates if the operation is allowed.

The event handler can be used to disallow undocking by setting the Boolean argument to False in the handler routine.

OnUnDock is signalled from the DoUnDock method.

## See also

TWinControl.DoUnDock |  | Notifies an OnUnDock handler and the DockManager of an undocked client control.