加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

FLEX学习-4 登录界面

发布时间:2020-12-15 03:58:57 所属栏目:百科 来源:网络整理
导读:1、在flash builder 4.0中新建一个MXML应用程序; 2、在.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="libr

1、在flash builder 4.0中新建一个MXML应用程序;

2、在.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">
?<fx:Declarations>
??<mx:StringValidator source="{username}" property="text" minLength="4" maxLength="10" />
?</fx:Declarations>
?<s:Panel title="Form Container Example"
??? width="75%" height="75%"
??? horizontalCenter="0" verticalCenter="0">?
??<s:VGroup left="10" right="10" top="10" bottom="10">
???<mx:Form x="10" y="10" width="300" height="152" defaultButton="{submitButton}">
????<mx:FormHeading label="用户登录"/>
????<mx:FormItem label="用户名:">
?????<s:TextInput id="username" />
????</mx:FormItem>
????<mx:FormItem label="密码:" >
?????<s:TextInput id="password"? />
?????<s:Button id="submitButton" label="提交" />
????</mx:FormItem>
???</mx:Form>
??</s:VGroup>
?</s:Panel>
</s:Application>

4、编译后为如下效果

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读