In a handler for the 'textInput' event, set event.text = 
event.text.toUpperCase(). The 'textInput' event is dispatched after the text 
has been typed (or converted by an IME) but before it has been inserted into 
the TextField. The 'change' event is dispatched after the text has been 
inserted.

Gordon Smith
Adobe Flex SDK Team

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf 
Of per.olesen
Sent: Tuesday, March 10, 2009 1:19 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Turn all keyboard input into upper-case for all 
TextInput and TextArea


--- In flexcoders@yahoogroups.com<mailto:flexcoders%40yahoogroups.com>, Alex 
Harui <aha...@...> wrote:
>
> Unfortunately, the text controls don't use events as input events, but 
> dispatch them as notifications instead, so you can't fake events to them.
>

Okay, that explains why dispatching KeyboardEvent on TextField and TextEvent on 
TextInput doesn't work :-(

> Most brute force way is to set text to toUpperCase on the change event. Could 
> be slow on large strings and you may have to track and restore selection.

We got something near working with this approach, but yes, it resets selection, 
puts cursor in front of text etc. All things we will need to track and change 
then.

Any other good ideas out there?

Reply via email to