BlackBerry Forums Support Community
              

Closed Thread
 
Thread Tools
Old 04-28-2007, 03:56 AM   #1
snom
New Member
 
Join Date: Aug 2005
Model: 8700
Carrier: GoTone
Posts: 3
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, 01:18 PM   #2
PeterK
Knows Where the Search Button Is
 
Join Date: Apr 2007
Model: 8800
PIN: N/A
Carrier: n/a
Posts: 18
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, 08:03 PM   #3
snom
New Member
 
Join Date: Aug 2005
Model: 8700
Carrier: GoTone
Posts: 3
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, 08:56 AM   #4
PeterK
Knows Where the Search Button Is
 
Join Date: Apr 2007
Model: 8800
PIN: N/A
Carrier: n/a
Posts: 18
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, 11:43 AM   #5
bemshaswing
Talking BlackBerry Encyclopedia
 
Join Date: Oct 2006
Model: 7103
Carrier: Verizon
Posts: 259
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, 09:40 PM   #6
dailianghui
New Member
 
Join Date: Jul 2006
Model: 8700
Carrier: No
Posts: 2
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



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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


Jelenko Commodore LS VPF with Pump  picture

Jelenko Commodore LS VPF with Pump

$875.00



Windsor Commodore Duo 20

Windsor Commodore Duo 20" Carpet extractor w/Lester Charger 25900/Battery/99hour

$2519.95



6500/1 A 6502 VARIENT CPU COMMODORE USE IN AMIGA KB & 1520 PLOTTER NMOS NCR NOS picture

6500/1 A 6502 VARIENT CPU COMMODORE USE IN AMIGA KB & 1520 PLOTTER NMOS NCR NOS

$5.89



Vintage MOS 8502 8502R0 Commodore C64 very rare good condition x 1pc picture

Vintage MOS 8502 8502R0 Commodore C64 very rare good condition x 1pc

$22.00



Vintage Printer Switch box Commodore 64/Sanyo Mountable Computer PC picture

Vintage Printer Switch box Commodore 64/Sanyo Mountable Computer PC

$49.00



POLAR PLASTICS C64 Construction Film,6x100,4Mil,Clear PK 4 picture

POLAR PLASTICS C64 Construction Film,6x100,4Mil,Clear PK 4

$178.04







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