首页 > 其他 > 详细

CH03_07.mxml CH03_09.mxml两个文本框自动绑定

时间:2015-03-25 11:43:48      阅读:262      评论:0      收藏:0      [点我收藏+]

 CH03_07.mxml

<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" 
              xmlns:s="library://ns.adobe.com/flex/spark" 
              xmlns:mx="library://ns.adobe.com/flex/mx">
  <s:Group>
    <s:layout>
      <s:HorizontalLayout/>
    </s:layout>
    <s:TextInput id="myTextInput1" text="{myTextInput2.text}"/>
    <s:TextInput id="myTextInput2" text="{myTextInput1.text}"/>
  </s:Group>
</s:Application>

 另外一种方法绑定CH03_09.mxml

<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" 
              xmlns:s="library://ns.adobe.com/flex/spark" 
              xmlns:mx="library://ns.adobe.com/flex/mx">
  <s:layout> 
    <s:HorizontalLayout/> 
  </s:layout>               
  <fx:Binding source="myTextInput1.text" 
              destination="myTextInput2.text" 
              twoWay="true"/> 
  <s:TextInput id="myTextInput1"/>
  <s:TextInput id="myTextInput2"/>    

</s:Application>

 

CH03_07.mxml CH03_09.mxml两个文本框自动绑定

原文:http://www.cnblogs.com/ffmpeg/p/4364867.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!