DZone Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world
Flex 3 Combo Box Code
// description of your code here
Easiest way to populate a combo box.
var valueArray:Array = new Array();
var emptyItem:Object = new Object();
emptyItem.data = "";
emptyItem.label = "";
var buildingItem:Object = new Object();
buildingItem.data = "building";
buildingItem.label = "Building";
var regionItem:Object = new Object();
regionItem.data = "region";
regionItem.label = "Region"
valueArray.push(emptyItem);
valueArray.push(buildingItem);
valueArray.push(regionItem);
filterComboBox = new ComboBox();
filterComboBox.dataProvider = valueArray;
filterComboBox.addEventListener(ListEvent.CHANGE, filterUpdate);




