User Guide
178 ComboBox component
ComboBox.dropdown
Availability
Flash Player 6 (6.0.79.0).
Edition
Flash MX 2004.
Usage
comboBoxInstance.dropdown
Description
Property (read-only); returns a reference to the list contained by the combo box. The List
subcomponent isn’t instantiated in the combo box until it needs to be displayed. However,
when you access the
dropdown property, the list is created.
Example
With a ComboBox component instance my_cb on the Stage, and two movie clip symbols in
the library with Linkage ID values set to
dw_id and fl_id, the following ActionScript uses
the dropdown property to add icons to each item in the drop-down list:
// Set the dropdown width to accommodate the label sizes.
my_cb.dropdownWidth = 200;
// Set the iconField style within the ComboBox's dropdown property.
// The dropdown property is a reference to the List component within the
ComboBox
// so we can set List styles for the CB.
my_cb.dropdown.setStyle("iconField", "pIcon");
// Add Items to List.
my_cb.addItem({label:"Dreamweaver 1", pIcon:"dw_id"});
my_cb.addItem({label:"Flash 1", pIcon:"fl_id"});
my_cb.addItem({label:"Flash 2", pIcon:"fl_id"});
See also
ComboBox.dropdownWidth