Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Native Development

Reply
Highlighted
Developer
Posts: 121
Registered: ‎11-19-2008
My Device: Not Specified
Accepted Solution

Detecting ENTER pressed in a TextField?

Is there a way to detect when the user has pressed ENTER inside a TextField? I would like to have a TextField that when the user is done and hits enter the value is automatically processed by my app.

Developer
Posts: 6,473
Registered: ‎12-08-2010
My Device: PlayBook, Z10
My Carrier: none

Re: Detecting ENTER pressed in a TextField?

Look at the "input" property, and http://developer.blackberry.com/cascades/reference/bb__cascades__textinputproperties.html

Peter Hansen -- (BB10 and dev-related blog posts at http://peterhansen.ca.)
Author of White Noise and Battery Guru for BB10 and for PlayBook | Get more from your battery!
Developer
Posts: 313
Registered: ‎05-31-2010
My Device: Alpha 10, Bold 9900, Storm 9530, Tour 9630, Curve 9320, Curve 8900
My Carrier: All

Re: Detecting ENTER pressed in a TextField?

I got it and it needs to define a submit key.

 

http://developer.blackberry.com/cascades/reference/bb__cascades__submitkey.html#enum-connect




p(^_^)q
Good good study, day day up
Developer
Posts: 121
Registered: ‎11-19-2008
My Device: Not Specified

Re: Detecting ENTER pressed in a TextField?

Thanks peter and javayoung for the links, using the input{} block worked exactly the way I wanted it to.