Thank you for visiting the BlackBerry Support Community Forums.
- Kevin Michaluk, Founder, CrackBerry.com
03-16-2011 11:25 AM
overwrite keychar, check for the character to be http://www.blackberry.com/developers/docs/6.0.0api
03-16-2011 01:04 PM
An alternative is to create your EditField with NO_NEWLINE style bit (inherited from net.rim.device.api.ui.component.TextField). This will have a side effect of stripping the newline characters from the original value or any setText-supplied values.
As for your question on how to override keyChar and analyze the input for ENTER:
1) make sure you understand the concept of Java anonymous class (google it if necessary)
2) Read the documentation on net.rim.device.api.ui.Field and take a look at keyChar method.