Component Palette Icon:

On this page ...


The Tab Container uses tabs as navigation buttons arranged together with the selected tab highlighted. Only one component can be displayed in each tab. 


The following feature is new in Ignition version 8.1.2
Click here to check out the other new features
The Tab Container component has two pre-configured variants:

  • Classic - Layout is a traditional menu with boxed tabs.
  • Modern - Layout has no borders around each tab and shows selection with an underline.


Properties

Most Properties have binding options. For more information on Bindings, see Types of Bindings in Perspective.
This section only documents the Props Category of properties. The other Categories are described on the Perspective Component Properties page.

NameDescriptionProperty Type
tabs


Responsible for the number of tabs in the container. Adding additional elements to this array will result in an additional tab being rendered on the component.

In addition, each element is responsible for determining the content of the tab: either text or an embedded view. By default, the component starts with a single element is this array, set to a value type. Providing a string to the element will set the text on the tab.


If the element is changed to an object data type, then the text on the tab can be set by adding a text value member to the object and providing a string, as seen on element 0 below. Alternatively, viewPath (value data type) and viewParams (object data type) can be added to the element, which allows you to render a view inside the tab as well as pass parameters to it. Element 1 below demonstrates the idea. 

 


The following feature is new in Ignition version 8.1.5
Click here to check out the other new features
A boolean runWhileHidden property can be added to an element that's set to an object data type. This setting determines if contents of this tab loads once the tab is first activated, and if it should persist while in the background when the currentTabIndex changes.

The following feature is new in Ignition version 8.1.20
Click here to check out the other new features

A boolean disabled property can be added to an element that's set to an object data type. This setting determines if a tab can be selected. If the tab is already active when it becomes disabled, users will not be prevented from leaving the tab, but they will not be able to get back to it. The content of the tab is not affected by the enabled/disabled state of the tab.
array
currentTabIndexWhich index in tabs array is currently active.value: numeric
menuTypeIf the type is 'classic', a traditional menu with boxed tabs is shown. If the type is 'modern', it has no borders around each tab and shows selection with an underline.value: string dropdown
tabSize

Default size allotted to a single tab. If a container width does not allow, tab width will shrink from this size accordingly.

NameDescriptionProperty Type
widthWidth in pixels for the tab size.value: numeric
heightHeight in pixels for the tab size.value: numeric
object

menuStyle

Opens the Style menu to change Tab properties: Text, Background, Margin and Padding, Border, and Misc.

value: string dropdown

contentStyle

Sets a style for the content frame component. Full menu of style options is available. You can also specify a style class.

object
tabStyle

Additional styling to apply to all tabs depending active (selected) or inactive state.

NameDescriptionProperty Type
activeSets a style for a tab when it is the active tab. The Style menu contains all the tools for modifying text, background, margins, borders, and more. You can also specify a style class.object
inactiveSets a style for tabs that are inactive. The Style menu contains all the tools for modifying text, background, margins, borders, and more. You can also specify a style class.object
object
styleSets a style for this component. Full menu of style options is available. You can also specify a style class.object


User Interaction

Adding Components to Tabs

To add a component to a tab, deep select the Tab container, then drag a component onto it.

Adding and Deleting Tabs

To delete a tab, click on the "X" to the right of the tab itself. 

To add a tab, click on the Add icon to the right of the tabs: 

You can also use the right-click menu in the Property Editor. Just right click on the tab you want to work with. You'll see options for copying, pasting, 


Component Functions

  • Description

Returns an ArrayList, which contains references to all components inside of the container.

  • Parameters

none

  • Return

Array List - An ArrayList of components in the container. The resulting ArrayList can be iterated over via a for-loop.


Examples

Example 1

In this example, the default (Classic variant) Tab Container is used. Three tabs are set up in the Tab Container component. Tab 3 is active and contains a Map component.

PropertyValue
props.tabs.0Tab 1
props.tabs.1Tab 2
props.tabs.2Tab 3
props.menuStyle.backgroundColor#D5D5D5
tabStyle.active.backgroundColor#00FFFF
tabStyle.active.fontWeightbold
tabStyle.inactive.backgroundColor#CCFFFF
tabStyle.inactive.fontWeightlighter

Example 2

In this example, the default (Modern variant) Tab Container is used. Two tabs are set up in the Tab Container component, each with a Cylindrical Tank component.

PropertyValue
props.tabs.0Tank 1
props.tabs.1Tank 2
props.menuTypemodern


  • No labels