---
title: "deleteTabItem"
canonical: "https://help.vicon.com/space/Shogun16/13339887/deleteTabItem"
format: markdown
---
# Description

Delete the tab associated with the specified `userControlID`.

## Functional area

User Window

# Command syntax

## Syntax

|  |
| --- |
| `deleteTabItem userControlID itemIndex or "itemString"` |

### Arguments

| **Name** | **Type** | **Required** | **Comments** |
| --- | --- | --- | --- |
| `itemString` | string | or | The name of the specified tab |
| `itemIndex` | int | or | The item index of the specified tab |
| `userControlId` | int | yes | ID of user control to be deleted. |

### Flags

None

## Return value

boolean 

> 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 tab the main tab
$mainTab = `createTab $windowId "Main" `;
int $secondTab = `addTab $mainTab "Second"`;
 
// delete the second tab
deleteTabItem $mainTab 1;
```

# Additional information

## Related commands

- [addTab](https://vicon-help.atlassian.net/wiki/spaces/Shogun16/pages/13340717)
- [createTab](https://vicon-help.atlassian.net/wiki/spaces/Shogun16/pages/13339800)
- [deleteAllTabItems](https://vicon-help.atlassian.net/wiki/spaces/Shogun16/pages/13339836)
- [findTabItem](https://vicon-help.atlassian.net/wiki/spaces/Shogun16/pages/13339779)
- [getTabItem](https://vicon-help.atlassian.net/wiki/spaces/Shogun16/pages/13341476)
- [getTabSelItem](https://vicon-help.atlassian.net/wiki/spaces/Shogun16/pages/13341506)
- [selectTabItem](https://vicon-help.atlassian.net/wiki/spaces/Shogun16/pages/13340386)
- [setTabHandler](https://vicon-help.atlassian.net/wiki/spaces/Shogun16/pages/13341818)