Skip to main content

TdxRibbonTab Class

A Ribbon tab (also called a tabbed page).

Declaration

TdxRibbonTab = class(
    TcxComponentCollectionItem,
    IdxBarSelectableItem,
    IdxFadingObject,
    IdxFadingObjectFadingOptions,
    IdxAdornerTargetElement
)

Remarks

A new Ribbon tab can be created both at design and runtime. At design time, you can use the tab set’s context menu to create or delete a tab. At runtime, a new tab can be added at the end of the tab set using the Ribbon’s Tabs.Add method, or at a specified position using the Ribbon’s Tabs.Insert method.

To obtain information on the total number of tabs in the Ribbon, use the Ribbon’s TabCount property. Indexed access to an individual tab can be obtained via the Ribbon’s Tabs.Items property. It provides access to all Ribbon tabs regardless of whether tabs are currently visible in the control. To only obtain access to visible tabs, use the Ribbon’s VisibleTabs property instead. A currently selected tab is represented by the Ribbon’s ActiveTab property.

To display a Ribbon tab as a contextual tab, associate this Ribbon tab with an application context via the Context property. Use a context’s Activate method and the Visible property to change the visibility of contextual tabs associated with this context.

The tabbed page can contain an arbitrary number of tab groups. You can add (or delete) a group to the tabbed page at design time using the tab’s Groups property editor. When coding, a new group can be added to the page using the tab’s Groups.Add method. Access to an individual group is provided via the tab’s Groups.Items property. Handle the Ribbon’s OnTabGroupCollapsed and OnTabGroupExpanded events to be notified every time the tab’s group is collapsed/expanded when the Ribbon control is resized.

To provide a custom tab group (a TdxRibbonTabGroup descendant) for a Ribbon tab, override the tab’s GetGroupClass function to return the desired descendant type.

See Also