创建受约束的布局
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>
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>
相关文章推荐
- 创建一个受约束的布局
- IOS 使用代码创建约束,实现自动布局
- Auto Layout之创建布局约束
- Auto Layout之创建布局约束
- iOS AutoLayout自动布局中级开发教程(8)-VisualFormat可视化格式语言创建约束
- 创建基于约束的布局
- 论坛源码推荐(2月17日):FLKAutoLayout-简单创建布局约束 CRToast--自定义通知
- Java堆中对象创建、布局、访问全过程
- 【深入理解JVM】:Java对象的创建、内存布局、访问定位
- jQuery EasyUI 布局 - 创建 XP 风格左侧面板
- 泛型约束where条件的使用(通过类型参数动态反射创建实例)
- 布局技巧:创建可重用的UI组件
- T-sql 创建约束
- SQLserver代码创建约束
- 06_创建布局
- 108.UIView关于布局和约束的方法(AutoLayout)
- 【转】用Fragment创建动态的界面布局(附Android示例代码) - 小吉吉
- 在同一个schema不可以创建同名称的对象(索引、表、约束等) 但在不同一个schema下可以创建同名称的对象
- 使用float和clear创建网站三栏液态布局
- 一步步学习SPD2010--第十三章节--管理SP Server环境的Web内容(4)--创建页面布局