Home | Categories | Alphabetical | Classes | All Contents | [ < ] | [ > ]

Tab Widget Properties


Tab widgets present a display area on which different "pages" (base widgets and their children) can be displayed by selecting the appropriate tab.

Each tabbed area in a tab widget contains a base widget, to which other controls can be added. When initially created, a tab widget will contain a single tab. To add a tab, right-click on the tabbed portion of the tab widget and select "Add Tab". The new tab is added at the next logical location in the tab widget. To delete a tab, right-click on the tabbed portion of the tab widget and select "Delete Tab".

When programming in IDL, you create tab widgets using the WIDGET_TAB function. For more information, see WIDGET_TAB.

Tab Widget Attributes

For tab widgets, you can set common attributes and tab-specific attributes. For a list of common attributes, see Common Attributes. In addition, you can modify the attributes of the base widget that makes up the displayed area of each tab.

These are the tab widget-specific attributes:

Multiple Rows

The Multiple Rows attribute determines whether tabs will be displayed in multiple rows if the total length of all the tab titles exceeds the width of the largest tab base widget. By default, this value is set to False, which means that if the total length of all the tab titles exceeds the space available, scroll bars will be added to the tab interface to allow the user to cycle through the tabs. Set this value to True to create tabs in multiple rows if the total length exceeds the available space.

Note
If the Location attribute is set to either Left or Right, the Multiple Rows attribute is automatically set to True.

In the generated *.pro file, this value is specified with the MULTILINE keyword to the widget creation routine.

Location

The Location attribute determines the display location of the tabs on the tab widget. Possible values are Top, Bottom, Left and Right. The default value is Top.

In the generated *.pro file, this value is specified with the LOCATION keyword to the widget creation routine.

Tab Mode

The Tab Mode attribute specifies what support the widget has for receiving or losing focus through tabbing. By default, this value is set to Inherit.

Note
It is not possible to tab to disabled (Sensitive = False) or hidden (Visible = False) widgets.

Allowable values are:

Value
Description
Inherit
Upon creation, the widget inherits the tabbing support of the parent base.
None
Disallow tabbing into or out of the widget.
In and Out
Allow tabbing into and out of the widget.
In Only
Allow tabbing into the widget only.
Out Only
Allow tabbing off of the widget only.

Note
The default tab mode of a widget is Inherit. The tabbing support defined for the parent base, described in Base Widget Attributes, is inherited by widget children unless otherwise specified.

Note
In widget applications on the UNIX platform, the Motif library controls what widgets are brought into and released from focus using tabbing. The TAB_MODE keyword value is always zero, and any attempt to change it is ignored when running a widget application on the UNIX platform.

In the generated *.pro file, this value is specified with the TAB_MODE keyword to the widget creation routine. For more information on tabbing among widgets, see Tabbing in Widget Applications.

Tab Text

The Tab Text attribute specifies the text label used on the currently-selected tab. By default, this attribute contains the name of the base widget that holds the tab's contents.

In the generated *.pro file, this value is specified with the TITLE keyword to the widget base creation routine.

Tab Widget Events

For tab widgets, you can set common event properties and tab-specific event properties. By default, event values are not set. For a list of events common to all widgets, see Common Events.

These are the tab widget-specific event properties:

OnTabChange

The OnTabChange value is the routine that is called when the currently-selected tab of the tab widget changes. When you set this value, the calling sequence looks like this in the generated *_eventcb.pro file:

pro <RoutineName>, Event 

where RoutineName is the name of the event procedure you specify. Event is the event structure returned when a user changes the selected tab and is of the following type:

{WIDGET_TAB, ID:0L, TOP:0L, HANDLER:0L, TAB:0L} 

TAB contains the zero-based index of the tab selected.


Home | Categories | Alphabetical | Classes | All Contents | [ < ] | [ > ]