ArrayCollection In ComboBox : ComboBox Data « Components « Flex






ArrayCollection In ComboBox

ArrayCollection In 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 http://creativecommons.org/licenses/by-nc-sa/3.0/

-->

<!-- dpcontrols\ArrayCollectionInComboBox.mxml -->
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
    xmlns:s="library://ns.adobe.com/flex/spark"
    xmlns:mx="library://ns.adobe.com/flex/mx">
    <s:ComboBox id="myCB">
        <s:ArrayList id="stateArray">
            <fx:Object label="AL" data="Montgomery" />
            <fx:Object label="AK" data="Juneau" />
            <fx:Object label="AR" data="Little Rock" />
        </s:ArrayList>
    </s:ComboBox>
</s:Application>

   
    
    
    
    
    
    
  








Related examples in the same category

1.Set data for ComboBox with dataProviderSet data for ComboBox with dataProvider
2.ComboBox and ComboBox and <mx:dataProvider>
3.Use an array of strings as ComboBox data sourceUse an array of strings as ComboBox data source
4.Use remote data providers to supply data to your ComboBox controlUse remote data providers to supply data to your ComboBox control
5.Use child tags to set ComboBox data provider to ArrayCollection objectUse child tags to set ComboBox data provider to ArrayCollection object
6.ComboBox's default property is dataProviderComboBox's default property is dataProvider
7.Add data to ComboBox when click the buttonAdd data to ComboBox when click the button
8.Get data length from ComboBox after removing the first itemGet data length from ComboBox after removing the first item
9.Reset data in ComboBoxReset data in ComboBox
10.Feed data from web service to ComboBox
11.dataProvider for ComboBoxdataProvider for ComboBox
12.Use ComboBox as the Credit card type data sourceUse ComboBox as the Credit card type data source
13.Define Label and value separately for ComboBox data bindingDefine Label and value separately for ComboBox data binding
14.ComboBox with static string array as its data sourceComboBox with static string array as its data source
15.ComboBox data with Multiple propertiesComboBox data with Multiple properties
16.ComboBox data variablesComboBox data variables
17.data provider can contain objects with multiple fieldsdata provider can contain objects with multiple fields
18.Create ComboBox from ModelCreate ComboBox from Model
19.Assign Array to ComboBox and get the length of the added arrayAssign Array to ComboBox and get the length of the added array
20.String array collection for ComboBoxString array collection for ComboBox
21.Object array for ComboBoxObject array for ComboBox