-
FEATURED COMPONENTS
First time here? Check out the FAQ!
I tried adding an EventListener of "onChanging" type to a Textbox, but the listener doesn't get invoked when the user presses the Enter key inside the Textbox. How do I intercept the Enter key event?
An ugly incomplete solution I attempted is to make the textbox multiline=true rows=1, which will invoke my listener when the Enter-key puts '\n' to the textbox. However, I have to immediately remove '\n' from the textbox, which causes a visual jumping of the text inside the single-line textbox.
Thanks in advance for any better solution.
windeyu
You can extend EventListener and register for onOK event, to listen for ENTER event:
component.addEventListener("onOK", this);
Asked: 2009-09-04 23:30:31 +0800
Seen: 563 times
Last updated: Sep 08 '09