zoukankan      html  css  js  c++  java
  • CH03_07.mxml CH03_09.mxml两个文本框自动绑定

     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>
  • 相关阅读:
    【leetcode】对称二叉树
    【leetcode】判断回文数
    053686
    053685
    053684
    053683
    053682
    053681
    053680
    053477
  • 原文地址:https://www.cnblogs.com/ffmpeg/p/4364867.html
Copyright © 2011-2022 走看看