Mega Code Archive

 
Categories / Flex / Components
 

Bind ComboBox and TextInput and Text

<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">     <mx:Script>                      [Bindable]             private var bindableText:String = "";             private function setText():void             {                 bindableText = String(cb.selectedItem);             }            </mx:Script>     <mx:VBox>         <mx:ComboBox id="cb" dataProvider="{['A', 'B', 'C', 'D']}" change="setText()"/>         <mx:TextInput id="inputFromCB" width="200" text="{bindableText}"/>         <mx:Text id="textFromCB" width="200" text="{inputFromCB.text}"/>     </mx:VBox>     </mx:Application>