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

Flex 登录布局实例

发布时间:2020-12-15 04:58:37 所属栏目:百科 来源:网络整理
导读:?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" minWidth="955" minHeight="600"fx:Declarations!-- Place non-vis
<?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" minWidth="955" minHeight="600">
	<fx:Declarations>
		<!-- Place non-visual elements (e.g.,services,value objects) here -->
	</fx:Declarations>
	<s:Panel width="376" height="244" horizontalCenter="0" verticalCenter="0" fontSize="14">
		<s:HGroup>
			<s:BorderContainer borderWeight="0">
				<s:Image horizontalCenter="0" source="assets/images/loginIcon.png"/>
			</s:BorderContainer>
			<s:Form width="261" height="192">
				<s:FormItem  label="Username: " width="250">
					<s:layout>
						<s:BasicLayout/>
					</s:layout>
					<s:TextInput id="uname" x="-111" width="136"/>
				</s:FormItem>
				<s:FormItem label="Password: "  width="249">
					<s:layout>
						<s:BasicLayout/>
					</s:layout>
					<s:TextInput id="pwd" x="-111" width="136"/>
				</s:FormItem>
				<s:CheckBox id="isSaveUnameAndPwd" width="236" label="Save  UserName  And  Password"/>
				<s:HGroup width="239" height="28" horizontalAlign="right">
					<s:Button width="72" height="26" label="Login"/>
					<s:Button width="72" height="26" label="Cancel"/>	
				</s:HGroup>
				<s:FormItem label="The username is not existed" id="errorTip" visible="false"/>
			</s:Form>
		</s:HGroup>
		
	</s:Panel>
</s:Application>

?备注:

?? 1、用于保证panel居中

horizontalCenter="0" verticalCenter="0"

???

?? 2、在panel中设置了字体大小之后,panel内部的组件无需重复设置。

fontSize="14"

???

?? 3、设置了basiclayout之后,组件的位置就可以拖动了

<s:layout>
	<s:BasicLayout/>
</s:layout>

(编辑:李大同)

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

    推荐文章
      热点阅读