Skip to main content

TdxCustomDockControl.DockTo(TdxCustomDockControl,TdxDockingType,Integer) Method

Docks the control to the specified dock control in the specified manner.

Declaration

procedure DockTo(AControl: TdxCustomDockControl; AType: TdxDockingType; AIndex: Integer);

Parameters

Name Type
AControl TdxCustomDockControl
AType TdxDockingType
AIndex Integer

Remarks

Use the DockTo method to perform a docking operation on a dock control. The AControl parameter specifies the control to which the current docking control will be docked. The AType parameter specifies the manner in which the control will be docked. It can either be docked to an edge of the target control or fill its entire client area. The AIndex parameter specifies the target position of the control within the container where it is to be docked. If docked to a tab container, this parameter specifies the index of the tab corresponding to the control. If docked to a side container, it specifies the visual position of the control in the container. Note that tabs are counted from left to right, the same as for controls within horizontal side containers. In vertical side containers, controls are indexed from top to bottom. Indexes are always zero-based. If a negative index is specified, the control is docked to the last position within the container. The same occurs if the specified index is greater than the last available. After a control has been docked, you can determine its position within the container by reading the control’s DockIndex property value.

Note that docking is performed taking into account the AllowDock property of the control being docked and the AllowDockClients property of the target control. If these properties do not allow the specified docking operation, the DockTo method does nothing.

See Also