Mega Code Archive

 
Categories / Flex / Data Model
 

Bind to a Property with Binding tag

<?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" xmlns:s="library://ns.adobe.com/flex/spark">     <mx:Binding source="nameInput.text.length + ' letters.'" destination="nameOutput.text" />          <mx:Panel title="Data Binding Example" width="300" height="300">         <mx:Label text="Enter name:" />         <mx:TextInput id="nameInput" maxChars="20" />         <mx:Label text="You entered:" />         <s:RichText id="nameOutput" />              </mx:Panel>      </mx:Application>