---
title: "deleteAllDropListItems"
canonical: "https://help.vicon.com/space/Shogun114/196387008/deleteAllDropListItems"
format: markdown
---
# Description

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

## Functional area

User Window

# Command syntax

## Syntax

|  |
| --- |
| `deleteAllDropListItems 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 Drop List 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 = `createDropList $windowId`;
// Add some items to the Drop List.
addDropListItem $controlId "Item 1";
addDropListItem $controlId "Item 2";
addDropListItem $controlId "Item 3";
 
// Delete all the items. The Drop List will be empty after this.
deleteAllDropListItems $controlId;
```

# Additional information

## Related commands

- [addDropListItem](https://vicon-help.atlassian.net/wiki/spaces/Shogun114/pages/196381669)
- [createDropList](https://vicon-help.atlassian.net/wiki/spaces/Shogun114/pages/196390581)
- [deleteDropListItem](https://vicon-help.atlassian.net/wiki/spaces/Shogun114/pages/196386278)
- [findDropListItem](https://vicon-help.atlassian.net/wiki/spaces/Shogun114/pages/196393310)
- [getDropListItem](https://vicon-help.atlassian.net/wiki/spaces/Shogun114/pages/196390482)
- [getDropListSelItem](https://vicon-help.atlassian.net/wiki/spaces/Shogun114/pages/196390768)
- [getNumDropListItems](https://vicon-help.atlassian.net/wiki/spaces/Shogun114/pages/196388531)
- [selectDropListItem](https://vicon-help.atlassian.net/wiki/spaces/Shogun114/pages/196392185)
- [setDropListHandler](https://vicon-help.atlassian.net/wiki/spaces/Shogun114/pages/196390919)