![]() ![]() ![]() | |
![]() | |
![]() | |
![]() |
Flash Player 6.0.79.
Flash MX 2004.
myComboBox
.labelFunction
Property; a function that computes the label of a dataProvider item. You must define the function. The default value is undefined.
The following example creates a data provider and then defines a function to specify what to use as the label in the drop-down list:
myComboBox.dataProvider = [ {firstName:"Nigel", lastName:"Pegg", age:"really young"}, {firstName:"Gary", lastName:"Grossman", age:"young"}, {firstName:"Chris", lastName:"Walcott", age:"old"}, {firstName:"Greg", lastName:"Yachuk", age:"really old"} ]; myComboBox.labelFunction = function(itemObj){ return (itemObj.lastName + ", " + itemObj.firstName); }
![]() | |
![]() | |
![]() | |
![]() ![]() ![]() |