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?

Thanks,

Philip

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

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




                                          
_________________________________________________________________
http://clk.atdmt.com/UKM/go/197222280/direct/01/
We want to hear all your funny, exciting and crazy Hotmail stories. Tell us now

Reply via email to