In order to make life easier Flex offers a property called truncateToFit with its lable component, thereby offsetting the developer to manually handle truncating long labels & appending '...' at the end.
But, it is noteworthy that only setting the truncateToFit Boolean does not suffice. You need to also mention the 'maxWidth' and/or 'width' property for the label.
<mx:Label text="Hello World!" truncateToFit="true" maxWidth="180"/>
No comments:
Post a Comment