您的位置:首页 > 其它

创建受约束的布局

2007-06-03 13:42 393 查看
让页面上的组件随窗体的改变而改变。所有容器的布局方式都应设置为绝对方式(absolute)。

Demo:


<?xml version="1.0" encoding="utf-8"?>


<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">


<!--Use x,y to define the position of the component;


Use width,height to define the size of the component;


Use left,right,top,bottom to define the distance between the component border and


the container border;


-->


<mx:Label x="20" y="60" text="Email"/>


<mx:TextInput y="60" right="60" left="90"/>


<mx:Label x="20" y="90" text="Comments"/>


<mx:TextArea left="90" right="60" top="90" bottom="190"/>


<mx:Button label="Send" right="60" bottom="150"/>




</mx:Application>

内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: