RAD Studio VCL Reference
|
Lists the controls that are docked to the windowed control.
property DockClients [Index: Integer]: TControl;
__property TControl * DockClients[int Index];
Use DockClients to access any control that is docked to the windowed control.
C++ Examples:
/* This example shows how to undock a dockable object. This example is part of the Docking Demo. */ void __fastcall TTabDockHost::FormClose(TObject *Sender, TCloseAction &Action) { TRect ARect; TPoint point; if (PageControl1->DockClientCount == 1) { point = PageControl1->DockClients[0]->ClientToScreen(Point(0, 0)); ARect.left = point.x; ARect.top = point.y; point = PageControl1->DockClients[0]->ClientToScreen( Point(PageControl1->DockClients[0]->UndockWidth, PageControl1->DockClients[0]->UndockHeight)); ARect.right = point.x; ARect.bottom = point.y; PageControl1->DockClients[0]->ManualFloat(ARect); Action = caFree; } else Action = caHide; }
Delphi Examples:
{ This example shows how to undock a dockable object. This example is part of the Docking Demo. } 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;
Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
|
What do you think about this topic? Send feedback!
|