Skip to main content

TdxZone.GetDockingSelection(TdxCustomDockControl) Method

Returns the bounding rectangle of the docking frame indicating the specified control’s position if it is docked to this zone.

Declaration

function GetDockingSelection(AControl: TdxCustomDockControl): TRect; virtual;

Parameters

Name Type
AControl TdxCustomDockControl

Returns

Type
TRect

Remarks

If the mouse pointer is not currently over the dock zone, the docking frame’s bounding rectangle is specified by the dock control’s OriginalWidth and OriginalHeight properties. If a dock zone is under the mouse pointer, the bounding rectangle of the docking frame is specified by the GetDockingSelection method’s return value. This provides the potential position of the control if the docking operation is finished immediately (i.e. if the mouse button is released).

The ATarget parameter of the GetDockingSelection method specifies the control whose docking frame dimensions are to be obtained. Note that the rectangle returned is expressed in screen coordinates.

Note

To fill docking frames with the clHighlight system color, set the doFillDockingSelection flag in the Options property of a docking controller or manager. To manually paint docking frames, handle the OnCustomDrawDockingSelection event of the desired dock control or the OnCustomDrawDockingSelection event of the docking manager.

See Also