Search code examples
apache-flexadobeflex4word-wrap

Label word wrap in Flex 4


How can the text in a Label control (or a similar control) be wrapped in Flex 4 beta? In Flex 3 I could use the Text control but this is no longer available in Flex 4.


Solution

  • You can use maxDisplayedLines and lineBreak properties with spark Label component:

    <s:Label  maxDisplayedLines="{-1}"  lineBreak="toFit"   text="...." />
    

    It works with Flex 4.5.