---
title: "deleteAllListBoxItems"
canonical: "https://help.vicon.com/space/Shogun19/13795920/deleteAllListBoxItems"
format: markdown
---
# Description

Deletes all items in the list box user control that is specified by `userControlID`.

## Functional area

User Window

# Command syntax

## Syntax

|  |
| --- |
| `deleteAllListBoxItems userControlID` |

### Arguments

| **Name** | **Type** | **Required** | **Comments** |
| --- | --- | --- | --- |
| `userControlID` | int | yes | ID of user control to operate on. |

### Flags

None

## Return value

void 

> Macro (scroll-pagebreak)

## Examples

```plaintext
// Delete all the items in a List Box User Control.
int $windowId;
int $controlId;
 
// First create a User Window to place the Control on
$windowId = `createWindow "MyWindow"`;
// Create the User Control on the Window. 
$controlId = `createListBox $windowId`;
// Add some items to the List Box.
addListBoxItem $controlId "Item 1";
addListBoxItem $controlId "Item 2";
addListBoxItem $controlId "Item 3";
 
// Delete all the items. The List Box will be empty after this.
deleteAllListBoxItems $controlId;
```

# Additional information

## Related commands

- [addListBoxItem](https://vicon-help.atlassian.net/wiki/spaces/Shogun19/pages/13795752)
- [createListBox](https://vicon-help.atlassian.net/wiki/spaces/Shogun19/pages/13795874)
- [deleteListBoxItem](https://vicon-help.atlassian.net/wiki/spaces/Shogun19/pages/13795934)
- [findListBoxItem](https://vicon-help.atlassian.net/wiki/spaces/Shogun19/pages/13795990)
- [getListBoxItem](https://vicon-help.atlassian.net/wiki/spaces/Shogun19/pages/13796152)
- [getListBoxSelItems](https://vicon-help.atlassian.net/wiki/spaces/Shogun19/pages/13796154)
- [getNumListBoxItems](https://vicon-help.atlassian.net/wiki/spaces/Shogun19/pages/13796188)
- [selectListBoxItem](https://vicon-help.atlassian.net/wiki/spaces/Shogun19/pages/13796510)
- [setListBoxHandler](https://vicon-help.atlassian.net/wiki/spaces/Shogun19/pages/13796606)