MACROMEDIA COLDFUSION MX 7.0.2-USING COLDFUSION MX WITH FLEX 2 Uživatelská příručka Strana 139

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 256
  • Tabulka s obsahem
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků
Zobrazit stránku 138
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.
Zobrazit stránku 138
1 2 ... 134 135 136 137 138 139 140 141 142 143 144 ... 255 256

Komentáře k této Příručce

Žádné komentáře