Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Automatically change focus among Editfields in Blackberry

I have five EditField objects in my BlackBerry app, each one will accept only one numeric character.

I want to change the focus from the first EditField to the second EditField when a character is entered. Note the focus from one to another EditField must go automatically and not by pressing Enter key or some other key.

like image 254
AKASSABOX Avatar asked Dec 01 '25 09:12

AKASSABOX


1 Answers

You want to set a FieldChangeListener on the EditField to monitor when the contents of the field changes. Once the user has entered a single character you can move to the next field by calling Field.setFocus().

like image 134
donturner Avatar answered Dec 04 '25 06:12

donturner



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!