Home Flex Flex Combo Box example
Questions:Ask|Latest


 
 

Share on Google+Share on Google+

Flex Combo Box example

Advertisement
The following code demonstrates the ComboBox Control working example. This Control shows the drop-down list of data you passed as String inside it.

Flex Combo Box example

     

In this tutorial page you will be taught to utilize ComboBox control inside your flex file. In the example you will learn to build two ComboBox controls. The Example below shows combo boxes with nicely formatted string data, so here you will be also taught to do the graphical works on flex visual component. 

The following code demonstrates the ComboBox control working example. This control shows the drop-down list of data you passed as String inside it.

 combo.mxml

<?xml version = '1.0' encoding = 'utf-8'?>
<mx:Application xmlns:mx = 'http://www.adobe.com/2006/mxml'>
  <mx:Panel title = 'Megara (Hercules)' width = '70%
  height = '40%' color = '#FFFFCF'>
  <mx:Canvas backgroundColor = '#CCCCFC' width = 
  '100%' height = '100%'>

  <mx:ComboBox color = 'red'>
  <mx:dataProvider>
  <mx:Array>
  <mx:String> Neo/ Thomas Anderson 
  </mx:String>
  <mx:String> Trinity/ Carrie-Anne Moss
 </mx:String>
  <mx:String> Eve/ Rachel Weisz 
  </mx:String>
  </mx:Array>
  </mx:dataProvider>
  </mx:ComboBox>


  <mx:ComboBox x = '200' color = 'green'> 
  <mx:dataProvider>
  <mx:Array>
  <mx:String> Snow White - Adriana Caselotti
 </mx:String>
  <mx:String> Aurora - Mary Costa </mx:String>
  <mx:String> Ariel - Jodi Benson </mx:String>
  </mx:Array>
  </mx:dataProvider>
  </mx:ComboBox>
  
  </mx:Canvas>
  </mx:Panel>

</mx:Application>

 

combo.swf

 

Download the code

Advertisement

If you enjoyed this post then why not add us on Google+? Add us to your Circles



Liked it!  Share this Tutorial


Follow us on Twitter, or add us on Facebook or Google Plus to keep you updated with the recent trends of Java and other open source platforms.

Posted on: September 8, 2008

Ask Questions?    Discuss: Flex Combo Box example   View All Comments

Post your Comment


Your Name (*) :
Your Email :
Subject (*):
Your Comment (*):
  Reload Image
 
 
Comments
DMCA.com