BlackBerry Forums Support Community               

Closed Thread
 
LinkBack Thread Tools
Old 07-11-2008, 04:03 AM   #1 (permalink)
Knows Where the Search Button Is
 
Join Date: Jul 2008
Model: 8820
PIN: N/A
Carrier: Airtel
Posts: 18
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default KeyPress

Please Login to Remove!

Hi,

I have added an ActiveAutoTextEditField in my screen..

after typing in the characters, when i press enter Key, the control shifts to the next line..
Instead i want it to go to the next Field that i have added... (CheckBoxField)..

That is wen the focus is on the ActiveAutoTextEditField , after pressing enter key, The focus should go to the next Field that i have added to the screen ..

How to resolve this
Offline  
Old 07-11-2008, 05:06 AM   #2 (permalink)
CrackBerry Addict
 
Join Date: Jun 2005
Location: Manchester, UK
Model: BOLD
Carrier: t-mobile
Posts: 714
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

Overide keyChar and add some logic to change focus to next field, the getFieldWithFocusIndex() ,getFieldCount(), setFieldWithFocus(somefield) and getField(someInt) methods of MainScreen would be a good place to start. or to do it less dynamically just use mycheckboxField.setFocus();

public boolean keyChar(char key, int status, int time) {
boolean retval = false;
switch (key) {
case Characters.ENTER:
//move to next field
//or
//mycheckboxField.setFocus();
break;
default:
retval = super.keyChar(key, status, time);
}
return retval;
}
__________________
new job doesn't allow a public profile - please do not contact this user with questions, you will not get a response. good luck!
Offline  




Copyright 2004-2016 BlackBerryForums.com.
The names RIM and BlackBerry are registered Trademarks of BlackBerry Inc.