• 【设为首页】
  • 【收藏闪客居】
当前位置:主页>Flex>文章内容
  • Flex例3【创建适应浏览器的布局】
  • 来源: 作者: 2007-09-29 【
Create a Constraint-based Layout 
主要是设置好各元素与边框之间的距离。也就是right,left,top,bottom。
 
Maintain the component's position and size 【None】
Move the component horizontally【Right】
Move the component vertically【Bottom】
Move the component both horizontally and vertically【Right + Bottom】
Resize the component horizontally【Left + Right】
Resize the component vertically【Top + Bottom】
Resize the component both horizontally and vertically【Left + Right + Top + Bottom】
Center the component horizontally【Horizontal center】
Center the component vertically【Vertical center】

效果可以看下面的例子..布局能适应浏览器的大小:attachments/month_0609/6200692595317.swf

MXML代码如下:
程序代码 程序代码
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">
    <mx:Label x="20" y="60" text="E-mail:"/>
    <mx:TextInput y="60" left="90" right="60"/>
    <mx:Label x="20" y="90" text="Comment:"/>
    <mx:TextArea left="90" right="60" top="90" bottom="190"/>
    <mx:Button label="send" right="60" bottom="150"/>    
</mx:Application>






上一篇:Flex例2【获取和显示数据】   下一篇:Flex例4【列表形式控件的运用】
  • 用户名:新注册) 密码: 匿名评论
  • 评论内容:(不能超过250字,需审核后才会公布,请自觉遵守互联网相关政策法规)
FLASH源文件

Copyright © 2006-2008 flashas.net All Rights Reserved.
网站内容咨询: admin#flashas.net (#为@) 联系QQ:40777822 浙ICP备06033001号
(本网站最佳浏览解析度为1024*768, 建议使用IE 6.0或以上版本浏览器。)