RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TWinControl.DoUnDock Method

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

Pascal
function DoUnDock(NewTarget: TWinControl; Client: TControl): Boolean; dynamic;
C++
__fastcall Boolean DoUnDock(TWinControl * NewTarget, TControl * Client);

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.
 

 

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