Skip to main content

TdxCustomDockControl.AutoHideControl Property

If the dock control’s auto hide feature is enabled, this property returns the control itself. Otherwise, it returns the first control within the parent hierarchy that satisfies this condition.

Declaration

property AutoHideControl: TdxCustomDockControl read;

Property Value

Type
TdxCustomDockControl

Remarks

The auto hide feature can be enabled for a dock control by setting its AutoHide property to True. If enabling the auto hide feature for a container, the actual control’s behavior depends on the doTabContainerCanAutoHide and doSideContainerCanAutoHide options. If these options are enabled, activating the auto hide feature for a container results in hiding all of its child controls. Use the Options property of the docking manager to access these options.

When the auto hide feature is enabled, you can show/ hide the control using code. To do this, you should assign the desired control to the ShowingControl property of the dock control returned by the auto hide host site. This site can be accessed via the dock control’s AutoHideHostSite property.

Note that if a control is within an auto-hidden container, assigning this control to the ShowingControl property of the host site will have no effect. To show the control programmatically, you need to assign the owning container to that property.

The AutoHideControl property eliminates the need to check whether the control is auto-hidden itself or within an auto-hidden container. If the auto hide feature is enabled for the control itself, the panel’s AutoHideControl property will return the control. If a control is within an auto-hidden container, the container will be returned by this property. If the auto hide feature is not enabled for the dock control or for any of its parents, the AutoHideControl property will return nil.

Thus, assigning the AutoHideControl property to the ShowingControl property of the host site results in making the control visible. Note, however, that if the control is within an auto-hidden tab container, you should also set the container’s ActiveChildIndex property to the DockIndex property of the child to be displayed.

See Also