1
我有一個包含VGroup的spark窗口。 VGroup內部有幾個HGroups。發生的是,在styleName爲「toastBody」的標籤中,如果其文本太長,那麼'x'closeButton會從組件的右邊緣推出,而文本也會從右邊緣移出。即使我已經設置了VGroup的左側,頂部和右側,並將標籤上的paddingRight設置爲10。Flex - 防止文本在組件邊緣運行
<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>
我該如何解決這個問題?
是的 - 謝謝。我還設置了maxDisplayedLines =「2」,然後我得到我正在尋找的省略號。 – David