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>
本文详细介绍了Flex布局中块标记ConstraintColumn和ConstraintRow的使用方法,并对比了label控件与text控件的特点,特别是关于文本换行的支持。通过具体示例展示了如何设置控件的位置及尺寸。
3374

被折叠的 条评论
为什么被折叠?



