UnDock (Delphi)
Description
This example shows how to undock a dockable object. This example is part of the Docking Demo.
Code
procedure TTabDockHost.FormClose(Sender: TObject;
  var Action: TCloseAction);
var
  ARect: TRect;
begin
  if PageControl1.DockClientCount = 1 then
  begin
    with PageControl1.DockClients[0] do
    begin
      ARect.TopLeft := ClientToScreen(Point(0, 0));
      ARect.BottomRight := ClientToScreen(Point(UndockWidth, UndockHeight));
      ManualFloat(ARect);
    end;
    Action := caFree;
  end else
    Action := caHide;
end;
Uses
- Vcl.Controls.TControl.UndockHeight ( fr | de | ja )
- Vcl.Controls.TControl.UndockWidth ( fr | de | ja )
- Vcl.Controls.TControl.ManualFloat ( fr | de | ja )
- Vcl.Controls.TWinControl.DockClients ( fr | de | ja )