From the category archives:

Text

The following example shows how you can set word wrapping on a Flex 4 Spark TextArea control by setting the lineBreak style to one of the static constants in the LineBreak class (flashx.textLayout.formats.LineBreak):

  • toFit (LineBreak.TO_FIT): For lines that wrap to fit to the container width.
  • explicit (LineBreak.EXPLICIT): For lines that break only at explicit return/line feeds.

Full code after the jump.

[click to continue…]

{ 8 comments }

The following examples show how you can set the text leading (additional vertical space between lines of text) on a Flex Text control by setting the leading style using MXML, CSS or ActionScript.

Full code after the jump.

[click to continue…]

{ 6 comments }