
Populate the list 139
1. In the editor’s Source mode, enter the <mx:dataProvider> tag between the opening and
closing
<mx:ComboBox> tag, as the following example shows:
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
layout="absolute">
<mx:Panel x="10" y="10" width="350" height="200" title="Rate Customer
Service">
<mx:ComboBox id="cbxRating" x="20" y="20" width="100">
<mx:dataProvider>
<mx:Array>
<mx:String>Satisfied</mx:String>
<mx:String>Neutral</mx:String>
<mx:String>Dissatisfied</mx:String>
</mx:Array>
</mx:dataProvider>
</mx:ComboBox>
<mx:Button x="140" y="20" label="Send"/>
</mx:Panel>
</mx:Application>
2.
Save the file, wait until Flex Builder finishes compiling the application, and then click the
Run button in the toolbar.
A browser opens and runs the application.
3. Click the ComboBox control to view the list of items.
Comentários a estes Manuais