TDockManager.PositionDockRect procedure
Determines the DockRect while dragging a control over the docksite.
Declaration
procedure PositionDockRect(ADockObject: TDragDockObject); virtual
; overload
procedure PositionDockRect(Client: TControl; DropCtl: TControl;
DropAlign: TAlign; var DockRect: TRect)
; virtual; abstract; overloadArguments
ADockObject | The DragDockObject holding all information about the drag-dock operation. |
Client | The dropped control. |
DropCtl | The control relative to which Client shall be docked; Nil for docking into the docksite. |
DropAlign | How to dock, relative to DropCtl. |
DockRect | The screen rectangle of the docksite, to be adjusted by this method. |
Description
This method updates DockRect to provide visual feedback when a control is dragged over the docksite. The initial DragDockObject.DockRect spans the entire DockSite.
The Delphi-compatible version only can use the parameters determined by the default processing in the docksite.
The Lazarus version can update the DockObject with better-suited parameters. A DockManager here can implement any algorithm for the placement of a dropped control. The default implementation calls the Delphi compatible version. When you override the Lazarus version, you may have to determine the dock sibling and DropAlign again, when the default determination (in TControl and TWinControl) is inappropriate.
See also
An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.
