Category Archives: RichEditableText

Determining the number of lines in a Spark RichEditableText control in Flex 4

In a previous example, “Determining the number of lines in a TextArea control in Flex”, we saw how you could get the number of lines in an MX TextArea control by using the getTextField() method (in the mx_internal namespace) and the numLines property.

The following example shows how you can get the number of lines in a Spark RichEditableText control in Flex 4 by using the textContainerManager property (in the mx_internal namespace) and the numLines property.

Full code after the jump.

Continue reading Determining the number of lines in a Spark RichEditableText control in Flex 4

Setting the selection highlight color on a Spark RichEditableText control in Flex 4

The following example shows how you can set the text selection highlight color on a Spark RichEditableText control in Flex 4 by setting the focusedTextSelectionColor style.

Full code after the jump.

Continue reading Setting the selection highlight color on a Spark RichEditableText control in Flex 4

Customizing the appearance or a hyperlink in a TextFlow object in Flex 4

In a previous example, “Globally styling anchor tags on a Spark RichEditableText control in Flex 4”, we saw how you could globally style the normal and hover states of a hyperlink on a Flex 4 Spark RichEditableText control by setting the static TextFlow.defaultConfiguration object.

The following example shows how you can use a custom link formats to a TextFlow object in Flex 4 by padding a Configuration object to the static TextConverter.importToFlow() method.

Continue reading Customizing the appearance or a hyperlink in a TextFlow object in Flex 4

Creating a LinkElement in a Spark RichEditableText control in Flex 4

The following example shows how you can create a clickable link which pops up an Alert control in a Spark RichEditableText object’s text flow by using the <a /> tag and defining a click handler to the LinkElement.

Full code after the jump.

Continue reading Creating a LinkElement in a Spark RichEditableText control in Flex 4

Creating a simple animated text ticker using the Spark TextInput control in Flex 4

The following example shows how you can create a simple, animated text ticker using a Spark TextInput control in Flex 4 by using the Animate and SimpleMotionPath classes to tween the horizontalScrollPosition property.

Full code after the jump.

Continue reading Creating a simple animated text ticker using the Spark TextInput control in Flex 4

Globally styling anchor tags on a Spark RichEditableText control in Flex 4

The following example shows how you can globally style the normal and hover states of a hyperlink on a Flex 4 Spark RichEditableText control by setting the static TextFlow.defaultConfiguration object.

Continue reading Globally styling anchor tags on a Spark RichEditableText control in Flex 4