User Guide

212 Chapter 6: Components Dictionary
Description
Property (read-only); if the combo box is editable, value returns the value of the text box. If the
combo box is static,
value returns the value of the drop-down list. The value of the drop-down
list is the
data field, or, if the data field doesnt exist, the label field.
Example
The following example puts the data into the combo box by setting the dataProvider property.
It then displays the
value in the Output panel. Finally, it selects "California" and displays it in
the text box.
cb.dataProvider = [
{label:"Alaska", data:"AZ"},
{label:"California", data:"CA"},
{label:"Washington", data:"WA"}];
cb.editable = true;
cb.selectedIndex = 1;
trace('Editable value is "California": '+ cb.value);
cb.editable = false;
cb.selectedIndex = 1;
trace('Non-editable value is "CA": '+ cb.value);