Simple ComboBox : ComboBox « Components « Flex

Simple ComboBox

Simple ComboBox

Code from Flex 4 Documentation "Using Adobe Flex 4".

This user guide is licensed for use under the terms of the Creative Commons Attribution 
Non-Commercial 3.0 License. 

This License allows users to copy, distribute, and transmit the user guide for noncommercial 
purposes only so long as 
  (1) proper attribution to Adobe is given as the owner of the user guide; and 
  (2) any reuse or distribution of the user guide contains a notice that use of the user guide is governed by these terms. 
The best way to provide notice is to include the following link. 
To view a copy of this license, visit


    <!-- agent/SimpleComboBox.mxml -->
<s:Application xmlns:fx=""
    xmlns:s="library://" xmlns:mx="library://">
        public var cards: Array = [ 
            {label:"Visa", data:1}, 
            {label:"MasterCard", data:2}, 
            {label:"American Express", data:3} 
        public var selectedItem:Object; 
    <s:Panel title="ComboBox Control Example">
            <s:VerticalLayout />
        <mx:ComboBox id="cb1" dataProvider="{cards}" width="150"
            automationName="Credit Card List" />
        <s:VGroup width="250">
            <s:Label width="200" color="blue" text="Select a type of credit card." />
            <s:Label text="You selected: {selectedItem.label}" />
            <s:Label text="Data: {}" />


Related examples in the same category

1.ComboBox open/close easing functionComboBox open/close easing function
2.Create ComboBox with static objectsCreate ComboBox with static objects
3.Populating a ComboBox control using variablesPopulating a ComboBox control using variables
4.ComboBox-based custom componentComboBox-based custom component
5.extends the standard ComboBox control to initialize itextends the standard ComboBox control to initialize it
6.Sort ComboBox
7.Insert value to ComboBox through CursorInsert value to ComboBox through Cursor
8.Set row count for ComboBoxSet row count for ComboBox
9.Use labelFunction to provide label text for ComboBoxUse labelFunction to provide label text for ComboBox
10.Bind Image source to ComboBox
11.Pass in parameter from ComboBox to WebServicePass in parameter from ComboBox to WebService
12.Editable ComboBoxEditable ComboBox
13.Bind ComboBox and TextInput and TextBind ComboBox and TextInput and Text
14.Static ComboBoxStatic ComboBox
15.ComboBox with static String valuesComboBox with static String values
16.ComboBox component supports a closeEasingFunction style property.ComboBox component supports a closeEasingFunction style property.
17.Uses the bound propertyUses the bound property
18.Set a labelFunction for a ControlSet a labelFunction for a Control