How to specify line height for Text component in Flex

Yesterday I was doing some coding and I wanted to increase line-height of Text component, and saw that there is no line-height style property in Flex, like there is for example in CSS. So google helped me once again and I wound this article

It states that you use property leading to set line-height (that is the distance from bottom of first row of text to the top of next line of text).

If I have multiline text and want to increase leading or line-height, I can just do the following:

<mx:Text text="Here is a loooong string that will span multiple lines" leading="5" />

Below is an image that shows the difference in Text component if it has leading set to 1 and to 5. (screenshot is taken from

Leading = 5 vs. leading = 1


, , ,

  1. Leave a comment

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: