Hi all.

How would I achieve the task of restricting user input based on the current
contents of the TextInput? I am aware of the restrictChars property but that
doesn't help since it applies a blanket rule as to which characters are
allowed/not allowed.

An example here would be: allow the user to input a number with no more than
a precision of 2. In this case, as soon as the user enters 12.34 any more
keystrokes in the TextInput should become no-ops.

I did try adding event listeners to the KeyboardEvent.UP_KEY and
KeyboardEvent.DOWN_KEY but it seems that you can't stop the propagation or
prevent the default of keyboard events.

Any suggestions here would be very much appreciated. TIA,
sasuke
-- 
View this message in context: 
http://old.nabble.com/Restrict-user-input-in-TextInput-tp27756858p27756858.html
Sent from the FlexCoders mailing list archive at Nabble.com.

Reply via email to