Vcl.Controls.TWinControl.DoUnDock

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

function DoUnDock(NewTarget: TWinControl; Client: TControl): Boolean; dynamic;

C++

DYNAMIC bool __fastcall DoUnDock(TWinControl* NewTarget, TControl* Client);

Properties

Type Visibility Source Unit Parent
function protected
Vcl.Controls.pas
Vcl.Controls.hpp
Vcl.Controls TWinControl

Description

Undocks a control that is currently docked to the windowed control.

DoUnDock is called automatically when a control is undocked from the windowed control. It handles all necessary changes to the windowed control to accomplish the undocking. These are

1.Generates an OnUnDock event.

2.If there is no OnUnDock event handler, or if the event handler indicates that the client can be undocked, it removes the client from the DockClients property list.

The NewTarget parameter indicates the new host to which the undocked control is moving.

The Client parameter indicates the control to be undocked from the windowed control.

DoUnDock returns true if the client is successfully undocked, false if the undocking attempt was blocked by an OnUnDock event handler.

Override DoUnDock to change the way controls are undocked from the windowed control.

Note: DoUnDock occurs at the start of the undocking process. To handle changes when undocking is complete, override the DoRemoveDockClient method instead.

See Also