Skip to main content

TdxDockPosition Record

Contains data about a dock control’s docking position and size.

Declaration

TdxDockPosition = record

Remarks

Structures of type TdxDockPosition are used to save the state of a dock control when it is made to float and docked back to dock sites by double-clicking its caption. Note that this functionality is only available if the doDblClickDocking option is enabled and this can be accessed via the docking manager’s Options property.

When saving and restoring the dock control’s position, the dock control’s OnStoreDockPosition and OnRestoreDockPosition events are raised respectively. These events provide a parameter of the TdxDockPosition type. Use this parameter to modify the settings automatically determined.

The DockIndex field of the structure represents the index of the dock control within its container. This field value matches the DockIndex property of the dock control. The DockType field specifies the manner in which the control is docked to its parent. This field value matches the DockType property of the dock control.

The OriginalHeight and OriginalWidth fields specify the dock control’s dimensions while floating. These field values match the OriginalHeight and OriginalWidth properties of the dock control.

The Parent, SiblingAfter and SiblingBefore fields of the TdxDockPosition structure are used to specify the dock control to which the control will be docked when its position is restored. The Parent field specifies the parent dock control and matches the ParentDockControl property. The SiblingBefore and SiblingAfter fields specify dock controls neighboring to the current one within the container site (either a tab container or a side container). Note: if the dock control is not within a container site, the SiblingBefore and SiblingAfter fields are set to nil. If the control is the first within the owning container, the SiblingBefore field is set to nil. If it is the last one, nil is assigned to the SiblingAfter field.

When restoring the control’s position, the Parent field value is examined first. If it is not nil, the control is docked to the specified parent. Otherwise, the SiblingBefore and SiblingAfter fields are examined one after another. If they are both nil, the dock control remains floating.

See Also