<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" width="280" height="240">
<!-- 定义 面板容器为 约束布局 -->
<mx:Panel title="约束 控件大小 示例" layout="absolute" width="100%" height="100%">
<!-- 定义 按钮 到左边框的 距离为 60像素,到右边框的 距离为 30像素-->
<mx:Button id="button1" label="按钮" left="60" right="30" y="20"/>
</mx:Panel>
</mx:Application>
[img]/upload/attachment/115802/2a9b58cc-e5ae-3ede-959a-f52c203607dc.png[/img]
约束布局 定义 组件大小