Actionscript 3 Flex-防止文本从组件边缘溢出
我有一个spark窗口,其中包含一个VGroup。在VGroup中有几个hGroup。发生的情况是,在样式名为“toastBody”的标签中,如果其文本太长,则“x”Close按钮会被推离组件的右边缘,文本也会离开右边缘。即使我已经设置了VGroup的左、上、右,并在标签上将paddingRight设置为10,也会出现这种情况Actionscript 3 Flex-防止文本从组件边缘溢出,actionscript-3,flash-builder,flex-spark,Actionscript 3,Flash Builder,Flex Spark,我有一个spark窗口,其中包含一个VGroup。在VGroup中有几个hGroup。发生的情况是,在样式名为“toastBody”的标签中,如果其文本太长,则“x”Close按钮会被推离组件的右边缘,文本也会离开右边缘。即使我已经设置了VGroup的左、上、右,并在标签上将paddingRight设置为10,也会出现这种情况 <s:VGroup minHeight="0" left="16" top="12" right="4">
<s:VGroup minHeight="0"
left="16" top="12" right="4">
<s:HGroup width="100%" gap="45">
<s:Label styleName="toastTitle"
id="titleLabel" width="100%" />
<s:Button skinClass="skins.ToastCloseButtonSkin" id="closeButton"
buttonMode="true" useHandCursor="true"/>
</s:HGroup>
<s:HGroup>
<s:BitmapImage left="10" top="16"
source="assets/iconChatBubbleToastMsg.png" id="chatIcon"/>
<s:Label styleName="toastBody"
id="bodyLabel"
paddingRight="10"/>
</s:HGroup>
</s:VGroup>
如何修复此问题?您可以在该标签上设置maxWidth,以防止其脱离右边缘,但它将开始自动换行
<s:Label styleName="toastBody"
id="bodyLabel"
paddingRight="10" maxWidth="800"/>
是-谢谢。我还设置了maxDisplayedLines=“2”,然后得到了我想要的省略号点。