I have a Flex spark Label component with properties width=125 and maxDisplayedLines=1. This successfully truncates the text when it is too long to display, however if brackets are involved then the text is truncated in a way I do not want.
For example I set the text to “You (chinchiheather)” and it displays “You(…” never displaying any part of the text in brackets unless it can display all of it. I would prefer “You (chinchi…” than what I am being given. Is there some property I can set so that brackets are not treated specially, or does anyone know of some other way around this?
Thanks 🙂
The
Labelhas alineBreakstyle that you can use to control word wrapping. It also seems to apply to truncation. If you set thelineBreakstyle equal to “explicit”, the text be truncated at the point it no longer fits, and not after an open parentheses.The default value is for this style is “toFit”.
Or