The following example shows how you can get the Flex TextInput control to display the currently selected text regardless of whether it has focus by using the mx_internal namespace, the getTextField() method and the Boolean alwaysShowSelection property.
Full code after the jump.
[click to continue…]
Tagged as:
alwaysShowSelection,
getTextField(),
mx internal
The following example shows how you can restrict which characters a user can enter into a Flex TextInput control by setting the restrict property.
Full code after the jump.
[click to continue…]
Tagged as:
restrict
The following example shows how you can change the focus rectangle color for a Flex TextInput control by setting the themeColor style.
Full code after the jump.
[click to continue…]
Tagged as:
themeColor
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”).
[click to continue…]
Tagged as:
preventDefault()