selectedIndex

Specifies the index of the currently-selected tab.

Type

Integer

index of active tab

Example

if (Tab1.selectedIndex == 0) {
  Gauge1.visible = true;
}
else {
  Gauge1.visible = false;
}

Either syntax below can be used in component script:

selectedIndex           // unqualified
Tab1.selectedIndex      // qualified

For onInit/onRefresh scripts, and for component and property scripts on other components, the second (qualified) form is required.