Skip to main content

Tab Container Sites

  • 3 minutes to read

Tab containers are a special kind of dock control that unite several other dock controls within them. Their direct children may be dock panels or side containers. Tab containers display a single child at a time. End-users can switch between child controls using tabs. The image below shows an example of a tab container.

For reference information on tab containers, please refer to the TdxTabContainerDockSite class description.

How to Create a Tab Container


By default, you can comprise a tab container from dock panels only. To do so, you have to dock a panel to another panel so that the target control is filled entirely. This implies that the mouse cursor should point in the middle of the target dock panel when dropping. The image below shows an example.

Also, you can have side containers as direct children of a tab container. To enable this feature, activate the doSideContainerCanInSideContainer option. This option can be accessed via the Options property of the docking manager. If the option is enabled, you can create a tab container in the same manner as with dock panels. The image below shows an example.

If you need to drag individual controls away from the tab container, you must drag the corresponding tabs.

Settings of Tab Containers


Tab containers, as well as other dock controls, provide a number of settings specifying their appearance and functionality. Also they provide settings for child management (switching between child controls). The image below illustrates some of these settings. For more information about tab containers, please refer to the TdxTabContainerDockSite class description.

Feature Specifics


Docking Operations

Docking operations on tab containers are available to end-users only when the tab container displays its caption. When floating, the caption is always displayed. When docked, the caption’s visibility is dependant upon the ShowCaption property of the tab container and the doTabContainerHasCaption option.

Tab containers can be docked to side containers only when the doTabContainerCanInSideContainer option is enabled. Both options can be accessed via the Options property of the docking manager.

Caption Buttons

Caption buttons are displayed only when the tab container’s caption is visible. The previous paragraph explains how the tab container’s caption visibility is controlled.

The behavior of the close button depends upon the doTabContainerCanClose option. If enabled, pressing the close button hides the tab container together with its children. Otherwise, only the currently active child is affected by the button.

The behavior of the auto hide button depends upon the doTabContainerCanAutoHide option. If enabled, pressing the button results in activating the auto hide feature for the tab container. Otherwise, the feature is activated for the currently active child.

Auto Hide Feature

If the auto hide feature is enabled for a tab container, only individual children can be displayed at a single time. However, the labels corresponding to auto hidden child controls have a specific appearance. The active child’s corresponding label displays the control’s caption and image. Labels of other controls display images only. Note that if there is no image assigned to a control, the first letters of the control’s caption are displayed. The image below shows an example – a tab container with three child dock panels with the auto hide feature enabled.

See Also