I found the answer in 'setFocus()'. 

To: flexcoders@yahoogroups.com
From: loudj...@hotmail.com
Date: Tue, 1 Jun 2010 23:20:47 +0000
Subject: [flexcoders] Form not responding to 'enter keyDown' event


I have a delete confirmation Form object, with a 'keyDown' listener that is not 
responding when the enter key is pressed. The code works in isolation, but not 
as part of a larger, complex project.

Any ideas/tips how I can enable this functionality?



<?xml version="1.0" encoding="utf-8"?>
<s:TitleWindow xmlns:fx="http://ns.adobe.com/mxml/2009"; 
xmlns:mx="library://ns.adobe.com/flex/mx" >

<mx:Form " keyDown="{this.checkKey()}" defaultButton="{this.ok_btn}" 
width="100%" height="100%">
<s:HGroup horizontalAlign="center">
<s:Label text="{this._labelText}" />
<s:Button id="ok_btn" label="OK" click="handleOK()"/>
<s:Button label="Cancel" click="handleCancel()" />

We want to hear all your funny, exciting and crazy Hotmail stories. Tell us now

Reply via email to