块布局(constraintColumns、constrainRows)
label控件不支持换行,text控件支持换行,text控件设置left top right buttom属性后,文本可换行。
控件要基于浏览器的中央显示,设置horizontalCenter和verticalCenter为0
块布局:
块标记ConstraintColumn和ConstraintRow
使用方法:
<mx:constraintColumns>
<mx:ConstraintColumn id="column1" width="33%"/>
<mx:ConstraintColumn id="column2" width="33%"/>
<mx:ConstraintColumn id="column3" width="33%"/>
</mx:constraintColumns>
<mx:constrainRows>
<mx:ConstrainRow id="row1" height="60%"/>
<mx:ConstrainRow id="row1" height="40%"/>
</mx:constrainRows>
<mx:Text height="100%" left="20" right="column1:20" top="20" bottom="row1:20">
<mx:text>this is text1 text</mx:text>
</mx:Text>
<mx:Text height="100%" left="column2:20" right="column2:20" top="row2:20" bottom="20">
<mx:text>this is text2 text</mx:text>
</mx:Text>
<mx:Text height="100%" left="column3:20" right="20">
<mx:text>this is text3 text</mx:text>
</mx:Text>