ActionScript 2.0 Components Language Reference |
|
|
|
| ComboBox component > ComboBox.dropdown | |||
Flash Player 6 (6.0.79.0).
Flash MX 2004.
comboBoxInstance.dropdown
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.
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"});
|
|
|
|