flex中state使用区别
最新推荐文章于 2024-10-10 08:19:02 发布

「已注销」 于 2013-10-21 11:31:42 发布
版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
========================================flex4.6==========================
<?xml version="1.0" encoding="utf-8"?>
<mx:Panel xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx" layout="vertical"
width="400" height="300" title="Login" horizontalAlign="center">
<mx:states>
<mx:State name="connecting"/>
</mx:states>
<mx:VBox width="100%" height="100%" id="loginForm" horizontalAlign="center" verticalAlign="middle" paddingBottom="10" paddingLeft="10" paddingRight="10" paddingTop="10" verticalGap="10">
<s:Label x="143" y="82" fontWeight="bold" text="Enter a userName"/>
<s:TextInput x="135" y="113" id="username"/>
<s:Button x="166" y="155" label="Login" fontWeight="bold" id="Btn_login" enabled.connecting="true"/>
</mx:VBox>
</mx:Panel>
=========================================flex3.0==================================================================
<?xml version="1.0" encoding="utf-8"?>
<mx:Panel xmlns:mx="http://m.adobe.com/2006/mxml" layout="vertical" width="400" height="300" title="Login" horizontalAlign="center">
<mx:Script>
<![CDATA[
public function set isConnecting(value:Boolean):void
{
if (value)
this.currentState = "connecting";
else
this.currentState = "";
}
]]>
</mx:Script>
<mx:states>
<mx:State name="connecting">
<mx:AddChild relativeTo="{controlbar1}" position="lastChild">
<mx:ProgressBar labelPlacement="left" label="Connecting" indeterminate="true" enabled="true"/>
</mx:AddChild>
<mx:SetProperty target="{loginForm}" name="enabled" value="false"/>
</mx:State>
</mx:states>
<mx:VBox width="100%" height="100%" id="loginForm" horizontalAlign="center" verticalAlign="middle" paddingBottom="10" paddingLeft="10" paddingRight="10" paddingTop="10" verticalGap="10">
<mx:Spacer width="10" height="10"/>
<mx:Label text="Enter a username" fontWeight="bold"/>
<mx:TextInput id="ti_username" textAlign="center"/>
<mx:Button label="Login" width="100" click="parentApplication.onLoginBtClick()"/>
<mx:Spacer width="10" height="10"/>
<mx:Text id="ta_error" selectable="false" width="100%" minHeight="0" color="#DB0E0E" includeInLayout="{ta_error.text != ''}" textAlign="center"/>
</mx:VBox>
<mx:ControlBar horizontalAlign="center" id="controlbar1">
</mx:ControlBar>
</mx:Panel>
---
相关知识
flex中state使用区别
Flex中日期的转换
EZ Flex™
使用hive的beeline连接报错hadoop is not allowed to impersonate hadoop (state=08S01,code=0)解决方案
Unsupported mechanism type PLAIN (state=08S01,code=0)
Java 中 == 和 equals() 区别
反向传播在强化学习中的应用:智能机器人的控制1.背景介绍 强化学习(Reinforcement Learning,简称
“截止、截至、截止至”使用上有何区别?
css 制作出窝旅行面试练习
强化学习:通过奖励与惩罚驱动智能体学习的方法
原文链接: flex中state使用区别 https://m.mcbbbk.com/newsview564194.html
| 上一篇: 如何打造一个完美的宠物生活方式? | 下一篇: GOOGLE的摄像头漏洞 |



