A single tab that contains groups.

Parent Elements

This element can appear as a child of the following elements.

ElementDescriptionVersion IntroducedPro Version Introduced
<Tabs>The list of all available tabs.1.03.2

Child Elements

The following elements can be children of this one.

ElementDescriptionAppearsVersion IntroducedPro Version Introduced
<Group>A single group that appears within a single tab and contains controls.Zero or once1.03.2

Attributes

This element supports the following attributes:

AttributeDescriptionVersion IntroducedPro Version Introduced
CaptionThe tab's text. (Required)1.03.2
ContextCaptionThe tab's context caption, if it is meant to be a context tab. See Remarks section for details.1.03.2
ContextColorThe tab's context color, if it is meant to be a context tab. See Remarks section for details.1.03.2
KeyThe unique identifier of the tab. (Required)1.03.2
KeyboardTipThe keyboard tooltip that appears when the user holds the Alt key.1.03.2
TooltipThe text to appear when the user hovers over the control.1.03.2
VisibleThe tab's default visibility state.1.03.2

Caption

The Caption can be any text.

ContextCaption

The ContextCaption attribute sets the text that appears above a context tab. Multiple tabs can share the same context caption. See remarks below for details.

ContextColor

The ContextColor attribute sets the color of a context tab. Available colors are "Blue", "Yellow", "Green", "Red", "Purple", "Cyan" and "Orange". See remarks below for details.

Key

The Key attribute defines a unique identifier for the tab. The identifier must be unique among tabs but can share the same identifier as other elements such as commands or controls. The identifier is used to reference the tab for properties and methods such as the TabVisible property.

KeyboardTip

The KeyboardTip attribute establishes the sequence of keys that trigger this tab when the user is holding down the Alt key.

Tooltip

The Tooltip attribute sets the text to appear when the user hovers over the tab.

Visible

The Visible attribute determines if the tab is visible or hidden by default. If omitted, the tab is visible. Set this to "False" to hide it.

Remarks

The Tab element defines a single tab on the ribbon. A tab is equivalent to a top level menu in the current implementation of menus in OI. You don't have to define a File menu since all ribbons have a system button that acts as the file menu. Once you've created your tabs, you fill them with <Group> elements. You cannot place controls directly in a tab. Controls must go into groups instead.

Context tabs are special colored tabs that appear only when needed. Actually, context tabs only look different and they behave the same as any other tab. In fact, they will all be visible by default unless you set the Visible attribute to "False". When you need to show or hide a context tab at run time, use the TabVisible property. You can set the color of the tab to one of seven colors listed above in the Attributes section using the ContextColor attribute. You can also set the ContextCaption attribute to have more than one tab share a single caption. The context caption appears above these tabs, but two context tabs will only share the caption if they are next to each other. It's up you to keep "grouped" context tabs adjacent.

Example

<Tab Key="VIEW" Caption="View" KeyboardTip="V">
  <Group Key="VIEWS" Caption="Views" />
  <Group Key="SHOW" Caption="Show" />
  <Group Key="ZOOM" Caption="Zoom" />
  <Group Key="WINDOW" Caption="Window" />
  <Group Key="MACROS" Caption="Macros" />
</Tab>
 
<Tab Key="DESIGN" Caption="Design" ContextColor="Yellow" ContextCaption="Table Tools">
  <Group Key="DESIGNTABLESTYLEOPTIONS" Caption="Table Style Options" />
  <Group Key="DESIGNTABLESTYLES" Caption="Table Styles" />
  <Group Key="DESIGNTABLEBORDERS" Caption="Borders" />
</Tab>
 
<Tab Key="LAYOUT" Caption="Layout" ContextColor="Yellow" ContextCaption="Table Tools" Visible="True">
  <Group Key="LAYOUTTABLE" Caption="Table" />
  <Group Key="LAYOUTTABLEDRAW" Caption="Draw" />
  <Group Key="LAYOUTTABLEROWSCOLS" Caption="Rows & Columns" />
  <Group Key="LAYOUTTABLEMERGE" Caption="Merge" />
  <Group Key="LAYOUTTABLECELLSIZE" Caption="Cell Size" />
  <Group Key="LAYOUTTABLEALIGNMENT" Caption="Alignment" />
  <Group Key="LAYOUTTABLEDATA" Caption="Data" />
</Tab>
  • No labels