---
title: "selectTabItem"
canonical: "https://help.vicon.com/space/ShogunPost116/341119692/selectTabItem"
format: markdown
---
# Description

Activates the specified tab specifically by index, starting with 0.

## Functional area

User Window

# Command syntax

## Syntax

|  |
| --- |
| `selectTabItem userControlID index` |

### Arguments

| **Name** | **Type** | **Required** | **Comments** |
| --- | --- | --- | --- |
| `index` | int | yes | The index of the tab you want to make active |
| `userControlId` | int | yes | ID of User Window to place the control on. |

### Flags

None

## Return value

integer 

> Macro (scroll-pagebreak)

## Examples

```plaintext
// Create a tab and add and additional tab to the main tab.
int $windowId;
int $mainTab;
 
// First create a User Window to place the control on
$windowId = `createWindow "MyWindow"`;
 
// create a main tab controller then add a second and third tab
$mainTab = `createTab $windowId "Main" "Second" "Third"`;
 
// make the third tab active
selectTabItem $mainTab 2;
```

# Additional information

## Related commands

- [addTab](https://vicon-help.atlassian.net/wiki/spaces/ShogunPost116/pages/341117038)
- [createTab](https://vicon-help.atlassian.net/wiki/spaces/ShogunPost116/pages/341117530)
- [deleteAllTabItems](https://vicon-help.atlassian.net/wiki/spaces/ShogunPost116/pages/341117613)
- [deleteTabItem](https://vicon-help.atlassian.net/wiki/spaces/ShogunPost116/pages/341117684)
- [findTabItem](https://vicon-help.atlassian.net/wiki/spaces/ShogunPost116/pages/341117850)
- [getTabItem](https://vicon-help.atlassian.net/wiki/spaces/ShogunPost116/pages/341118725)
- [getTabSelItem](https://vicon-help.atlassian.net/wiki/spaces/ShogunPost116/pages/341118731)
- [setTabHandler](https://vicon-help.atlassian.net/wiki/spaces/ShogunPost116/pages/341120203)