BlackBerry Forums Support Community               

Closed Thread
 
LinkBack Thread Tools
Old 04-28-2007, 04:56 AM   #1 (permalink)
New Member
 
Join Date: Aug 2005
Model: 8700
Carrier: GoTone
Posts: 3
Post Thanks: 0
Thanked 0 Times in 0 Posts
Unhappy EditField problem

Please Login to Remove!

hello, everybody

how to get an editfield like this:
when i put down the "enter" key, move the cursor to the next component?

please help me,tlx
Offline  
Old 04-28-2007, 02:18 PM   #2 (permalink)
Knows Where the Search Button Is
 
Join Date: Apr 2007
Model: 8800
PIN: N/A
Carrier: n/a
Posts: 18
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

Add a text filter to it:
Code:
youEditField.setFilter(new TextFilter()
    public boolean validate(char c) {
        return c != '\n' && c != '\r';
    });
Offline  
Old 04-28-2007, 09:03 PM   #3 (permalink)
New Member
 
Join Date: Aug 2005
Model: 8700
Carrier: GoTone
Posts: 3
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default thanks

thank you very much,

but it can not move the cursor to the next component,
is there some other ideas?


Quote:
Originally Posted by PeterK View Post
Add a text filter to it:
Code:
youEditField.setFilter(new TextFilter()
    public boolean validate(char c) {
        return c != '\n' && c != '\r';
    });
Offline  
Old 04-30-2007, 09:56 AM   #4 (permalink)
Knows Where the Search Button Is
 
Join Date: Apr 2007
Model: 8800
PIN: N/A
Carrier: n/a
Posts: 18
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

It does move the cursor to the next field for me(8700/8800). Other option would be to send "track wheel down" event to the control.
Offline  
Old 04-30-2007, 12:43 PM   #5 (permalink)
Talking BlackBerry Encyclopedia
 
Join Date: Oct 2006
Model: 7103
Carrier: Verizon
Posts: 259
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

Upon return key hit, use the manager.setFocus(editField.getIndex() +1) to move the focus to where you'd like.
Offline  
Old 05-09-2007, 10:40 PM   #6 (permalink)
New Member
 
Join Date: Jul 2006
Model: 8700
Carrier: No
Posts: 2
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default it's working very well

Quote:
Originally Posted by PeterK View Post
It does move the cursor to the next field for me(8700/8800). Other option would be to send "track wheel down" event to the control.
thank you,

i send "track wheel down" like this

protected boolean keyDown(int keycode, int time) {
if(Keypad.key(keycode) == Keypad.KEY_ENTER) {
EventInjector.TrackwheelEvent eite = new EventInjector.TrackwheelEvent(TrackwheelEvent.THUM B_ROLL_DOWN, 1, 0);
EventInjector.invokeEvent(eite);
return true;
}
return false;
}
Offline  
Closed Thread


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On





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