Flex中如何通过displayAsPassword属性,设置TextInput文本显示密码形式(*)

main.mxml

  1. <?xml version="1.0" encoding="utf-8"?>
  2. <mx:Applicationxmlns:mx="http://www.adobe.com/2006/mxml"
  3. layout="vertical"
  4. verticalAlign="middle"
  5. backgroundColor="white">
  6. <mx:ApplicationControlBardock="true">
  7. <mx:CheckBoxid="checkBox"
  8. label="displayAsPassword:"
  9. labelPlacement="left"
  10. selected="true"
  11. change="textInput.displayAsPassword = checkBox.selected;"/>
  12. </mx:ApplicationControlBar>
  13. <mx:TextInputid="textInput"
  14. text="password"
  15. displayAsPassword="true"/>
  16. </mx:Application>

你可能感兴趣的:(xml,Flex,Adobe)