Spark Label linebreak
[Note to Self]
You can’t simply set the text of an MXML declared Spark Label like below and expect linebreak or carriage returns to work:
<s:Label text="this is where I desire my line break to be\nnow the second line begins....."
maxDisplayedLine="2"/>
You now have to explicitly wrap the linebreak or carriage return in binding brackets and single quotes like so:
<s:Label text="this is where I desire my line break to be{'\n'}now the second line begins....."
maxDisplayedLine="2"
lineBreak="explicit"/>
Advertisement
Leave a Comment
wishlist