The following example shows how you can create a Spark TextArea control in Flex 4 which resizes vertically when lines are added or removed by setting the heightInLines property to NaN (Not a Number).
Full code after the jump.
[click to continue…]
Tagged as:
Gumbo,
heightInLines
In a previous example, “Setting a gradient background fill on a Halo TextArea control in Flex 4″, we saw how you could create a linear gradient background on a Halo/MX TextArea control in Flex 4 by creating a custom border skin with a LinearGradient fill and setting the borderSkin style.
The following example shows how you can create a linear gradient background on a Spark TextArea control in Flex 4 by modifying the background fill in the TextArea control’s skin to a LinearGradient.
Full code after the jump.
[click to continue…]
Tagged as:
background,
entries,
fill,
GradientEntry,
Gumbo,
lineargradient,
rotation,
skin,
skinClass,
TextAreaSkin
The following example shows how you can set up tab stops on a Spark TextArea control in Flex 4 by setting the tabStops style.
Full code after the jump.
[click to continue…]
Tagged as:
Gumbo,
tabStops
The following example shows how you can insert and append text into a Spark TextArea control in Flex 4 by using the insertText() and appendText() methods.
appendText() — Appends the specified text to the end of the RichEditableText, as if you had clicked at the end and typed it. When RichEditableText supports vertical scrolling, it will scroll to ensure that the last line of the inserted text is visible.
insertText() — Inserts the specified text as if you had typed it. If a range was selected, the new text replaces the selected text; if there was an insertion point, the new text is inserted there, otherwise the text is appended to the text that is there. An insertion point is then set after the new text.
Full code after the jump.
[click to continue…]
Tagged as:
appendText(),
Gumbo,
insertText()
In a previous example, “Auto-scrolling a TextArea control in Flex”, we saw how you could auto-scroll a Flex Halo TextArea control when new content is added by setting the verticalScrollPosition property to the value of the maxVerticalScrollPosition property.
The following example shows how you can auto-scroll a Flex 4 Spark TextArea control using the appendText() method.
Full code after the jump.
[click to continue…]
Tagged as:
appendText(),
Gumbo