ComboBox.addItem()

Availability

Flash Player 6.0.79.

Edition

Flash MX 2004.

Usage

Usage 1:

comboBoxInstance.addItem(label[, data])

Usage 2:

comboBoxInstance.addItem({label:label[, data:data]})

Usage 3:

comboBoxInstance.addItem(obj);

Parameters

label A string that indicates the label for the new item.

data The data for the item; can be of any data type. This parameter is optional.

obj An object with a label property and an optional data property.

Returns

The index at which the item was added.

Description

Method; adds a new item to the end of the list.

Example

The following code adds an item to the myComboBox instance:

myComboBox.addItem("this is an Item");