The following example shows how you can get the number of lines in a Flex TextArea control by using the getTextField() method (in the mx_internal namespace) and the numLines property.
Full code after the jump.
Continue reading ‘Determining the number of lines in a TextArea control in Flex’
The following example shows how you can set the text color on an enabled and disabled Flex TextArea control by setting the color and disabledColor styles.
Full code after the jump.
Continue reading ‘Setting the disabled text color on a TextArea control in Flex’
The following example shows how you can set the selected text in a Flex TextArea control by using the setSelection() method.
Full code after the jump.
Continue reading ‘Setting text selection on a TextArea control in Flex’
In a previous example, “Condensing HTML white space in the TextArea control in Flex”, we looked at how you could condense HTML formatted text in a TextArea control by setting the condenseWhite property.
The following example shows you how you can condense white space around HTML tags using the Flex RichTextEditor control, the htmlText property, and the condenseWhite property.
Full code after the jump.
Continue reading ‘Condensing HTML white space in the RichTextEditor control in Flex’
The following example shows you how you can condense white space around HTML tags using the Flex TextArea control, the htmlText property, and the condenseWhite property.
Full code after the jump.
Continue reading ‘Condensing HTML white space in the TextArea control in Flex’
The following example shows how you can set the letter spacing in a Flex RichTextEditor control by setting the textAreaStyleName and letterSpacing styles.
Full code after the jump.
Continue reading ‘Setting the letter spacing in the RichTextEditor control in Flex’
The following example shows how you can dynamically load a CSS file and apply the style sheet to a Flex TextArea control by setting the styleSheet property.
Full code after the jump.
Continue reading ‘Applying a cascading style sheet to a TextArea control in Flex’
The following example shows how you can left, center, right, or fully justify a block of text in the Flex TextArea control by setting the textAlign style.
Full code after the jump.
Continue reading ‘Setting the text alignment in a TextArea control in Flex’
The following example shows how you can prevent a user from pressing Enter in a Flex TextArea control by listening for the textInput event and checking the TextEvent object’s text property for a newline character (”\n”).
Full code after the jump.
Continue reading ‘Preventing line feeds in a TextArea control in Flex’
The following example shows how you can create a custom scroll tip function for a TextArea control in Flex.
Full code after the jump.
Continue reading ‘Creating a custom scroll tip function on a Flex TextArea control’
The following example shows how you can display scroll tips on a Flex TextArea control when the user drags the scroll thumb.
Full code after the jump.
Continue reading ‘Displaying scroll tips on a Flex TextArea control’
The following example shows how you can set a status message in a RichTextEditor control’s title bar in Flex.
Full code after the jump.
Continue reading ‘Setting a status message in a Flex RichTextEditor control’
The following example shows how you can toggle live scrolling on a TextArea control in Flex by setting the liveScrolling property.
Full code after the jump.
Continue reading ‘Disabling live scrolling on a Flex TextArea control’
User “Fred” asked a question the other day about using the TextArea as an item editor in an editable, variable line height DataGrid control.
The following example shows how you can use the Flex TextArea control as a drop-in item editor to allow you to easily edit the items in a DataGrid control.
Full code after the jump.
Continue reading ‘Using a Flex TextArea control as a drop-in item editor’
The following example shows how you can control the drop shadow on a Flex TextArea control using the dropShadowColor, shadowDirection, and shadowDistance styles.
Full code after the jump.
Continue reading ‘Creating drop shadows on the Flex TextArea control’