TextInput controls will broadcast the FlexEvent.ENTER event when the 
enter key is pressed to simulate the default button being pressed for a 
form.

I'd like this same thing to happen on my DateFields.  I know that 
DateField wants to handle the enter key to do its parsing and closing 
of the "drop down" (inherits from ComboBase for the date picker), which 
is fine.  If it is only handling parsing, though, I would like the 
control to broadcast the enter event.

After looking at what the TextInput does, I overrode the keyDownHandler 
function in DateField where it handles the ENTER key.  At the end of 
the ENTER key handling scope I added:

dispatchEvent(new FlexEvent(FlexEvent.ENTER));

Everything compiles and it appears to broadcast the event.  However, 
the default button handling does not occur.

Any thoughts?

Reply via email to