Deletes all items in the list box user control that is specified by userControlID
.
User Window
deleteAllListBoxItems userControlID |
Name | Type | Required | Comments |
---|---|---|---|
userControlID | int | yes | ID of user control to operate on. |
None
void
// 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;