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.
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:
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 |
In the generated *.pro file, this value is specified with the MULTILINE keyword to the widget creation routine.
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.
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 |
Allowable values are:
| Note |
| Note |
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.
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.
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:
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.