Tag Archives: TextFlow

Styling the text selection format on a Spark TextArea control in Flex 4

The following example shows how you can style the text selection format on a Spark TextArea control in Flex 4 by setting the focusedSelectionFormat property on the TextFlow’s interactionManager to a new SelectionFormat object.

Continue reading Styling the text selection format on a Spark TextArea control in Flex 4

Dynamically adding paragraphs to a Spark RichText control in Flex 4

The following example shows how you can dynamically add paragraphs to a TextFlow in a Spark RichText control by creating a new SpanElement (<span/>) and ParagraphElement (<p/>) object and then adding the spans and paragraphs to the textFlow object using the addChild() method.

Full code after the jump.

Continue reading Dynamically adding paragraphs to a Spark RichText control in Flex 4

Displaying HTML formatted text in a Spark RichText control in Flex 4

The following example shows how you can set HTML text in a Spark RichText control in Flex 4 by converting the HTML string to a TextFlow object using the static TextConverter.importToFlow() method and setting the textFlow property.

Full code after the jump.

Continue reading Displaying HTML formatted text in a Spark RichText control in Flex 4