RE: [flexcoders] Re:How do I detect 'enter' key on a textInput control?

2009-04-21 Thread Gordon Smith
do I detect 'enter' key on a textInput control? Here is one way to do it. Let's say this is your mxml: mx:TextInput id=txt width=200 keyDown=txtKeyDownHandler(event)/ Then your keydown handler would be: // Waiting for return key private function txtKeyDownHandler(event:KeyboardEvent):void

[flexcoders] Re:How do I detect 'enter' key on a textInput control?

2009-04-20 Thread Pilby
Here is one way to do it. Let's say this is your mxml: mx:TextInput id=txt width=200 keyDown=txtKeyDownHandler(event)/ Then your keydown handler would be: // Waiting for return key private function txtKeyDownHandler(event:KeyboardEvent):void { if (event.keyCode == 13) { // do