User Guide
462 Chapter 6: Components Dictionary
data The data for the item. This parameter is optional and can be of any data type.
itemObject An item object that usually has label and data properties.
Returns
The index at which the item was added.
Description
Method; adds a new item to the position specified by the index parameter.
In the first usage example, an item object is always created with the specified
label property, and,
if specified, the
data property.
The second usage example adds the specified item object.
Calling this method modifies the data provider of the List component. If the data provider is
shared with other components, those components will update as well.
Example
The following line of code adds an item to the third index position, which is the fourth item in
the list:
myList.addItemAt(3,{label:'Red',data:0xFF0000});
List.cellRenderer
Availability
Flash Player 6 (6.0 79.0).
Edition
Flash MX 2004.
Usage
listInstance.cellRenderer
Description
Property; assigns the cell renderer to use for each row of the list. This property must be a class
object reference or a symbol linkage identifier. Any class used for this property must implement
the CellRenderer API.
Example
The following example uses a linkage identifier to set a new cell renderer:
myList.cellRenderer = "ComboBoxCell";