BlackBerry Forums Support Community               

Closed Thread
 
LinkBack Thread Tools
Old 03-05-2007, 12:28 AM   #1 (permalink)
New Member
 
Join Date: Mar 2007
Location: Shanghai
Model: 8700c
Carrier: Cingular
Posts: 3
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default How to "Select All" text in an EditField?

Please Login to Remove!

Hi,

There is an EditField with prefilled text in it. I'd like to make it selected all when the screen shows. How to do it? Anybody knows why the "left shift" key simulation does not take effect?

Thanks in advance!

I tried using EventInjector to simulate user pressing left shift and then moving the navigation move (it's a 8800 device), but it does not work. My code is as below:

EventInjector.KeyCodeEvent keyCodeEvent = new EventInjector.KeyCodeEvent(EventInjector.KeyCodeEv ent.KEY_DOWN,
(char)Keypad.KEY_LEFT_SHIFT, KeypadListener.STATUS_NOT_FROM_KEYPAD,
1000);
EventInjector.invokeEvent(keyCodeEvent);
EventInjector.NavigationEvent e = new EventInjector.NavigationEvent(EventInjector.Naviga tionEvent.NAVIGATION_MOVEMENT,
100, 0, KeypadListener.STATUS_ALT | KeypadListener.STATUS_NOT_FROM_KEYPAD | KeypadListener.STATUS_KEY_HELD_WHILE_ROLLING);
EventInjector.invokeEvent(e);
keyCodeEvent = new EventInjector.KeyCodeEvent(EventInjector.KeyCodeEv ent.KEY_UP,
(char)Keypad.KEY_LEFT_SHIFT, KeypadListener.STATUS_NOT_FROM_KEYPAD,
1000);
EventInjector.invokeEvent(keyCodeEvent);
Offline  
Old 03-08-2007, 10:06 PM   #2 (permalink)
New Member
 
Join Date: Mar 2007
Location: Shanghai
Model: 8700c
Carrier: Cingular
Posts: 3
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

I solved it myself - the alt key event was caught somewhere else. Closing...
Offline  
Old 04-09-2007, 02:48 PM   #3 (permalink)
New Member
 
Join Date: Feb 2006
Location: Colombia
Model: 8800
Carrier: Cingular
Posts: 12
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by xiaogy0318
I solved it myself - the alt key event was caught somewhere else. Closing...
Could you use the EventInjector class successfully? Can you explain me how to use t, I`ve been tryingt it but I could not.
Offline  
Old 04-10-2007, 04:42 AM   #4 (permalink)
New Member
 
Join Date: Mar 2007
Location: Shanghai
Model: 8700c
Carrier: Cingular
Posts: 3
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

Below is what I used for 8800. Hope it would help.

EventInjector.NavigationEvent e;
e = new EventInjector.NavigationEvent(EventInjector.Naviga tionEvent.NAVIGATION_MOVEMENT, 200, 0,
KeypadListener.STATUS_NOT_FROM_KEYPAD);
EventInjector.invokeEvent(e);
EventInjector.KeyEvent keyEvent = new EventInjector.KeyEvent(EventInjector.KeyEvent.KEY_ DOWN,
Keypad.map(Keypad.KEY_ALT), KeypadListener.STATUS_ALT | KeypadListener.STATUS_NOT_FROM_KEYPAD, 0);
EventInjector.invokeEvent(keyEvent);
keyEvent = new EventInjector.KeyEvent(EventInjector.KeyEvent.KEY_ UP, Keypad.map(Keypad.KEY_ALT),
KeypadListener.STATUS_ALT | KeypadListener.STATUS_NOT_FROM_KEYPAD, 0);
EventInjector.invokeEvent(keyEvent);
e = new EventInjector.NavigationEvent(EventInjector.Naviga tionEvent.NAVIGATION_CLICK, 0, 0,
KeypadListener.STATUS_ALT | KeypadListener.STATUS_NOT_FROM_KEYPAD);
EventInjector.invokeEvent(e);
e = new EventInjector.NavigationEvent(EventInjector.Naviga tionEvent.NAVIGATION_UNCLICK, 0, 0,
KeypadListener.STATUS_ALT | KeypadListener.STATUS_NOT_FROM_KEYPAD);
EventInjector.invokeEvent(e);
e = new EventInjector.NavigationEvent(EventInjector.Naviga tionEvent.NAVIGATION_MOVEMENT, Controller.EVENT_INJECTOR_END_TAG, 0,
KeypadListener.STATUS_NOT_FROM_KEYPAD);
EventInjector.invokeEvent(e);
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

ADCRAFT GNP-10 STAINLESS STEEL CREAMER 10 OZ SERVER
$5.99
ADCRAFT GNP-10 STAINLESS STEEL CREAMER 10 OZ SERVER picturePositron Enhance Server PBX Circuit Board NIM 912305/3P 220-000210-401
$62.0
Positron Enhance Server PBX Circuit Board NIM 912305/3P 220-000210-401 pictureIntel 10Gbe AF DA 2 Port Server Adapter E10G42AFDA
$149.0
Intel 10Gbe AF DA 2 Port Server Adapter E10G42AFDA pictureSolarflare 10Gbps Dual Port Server Adapter S6102 5122
$150.0
Solarflare 10Gbps Dual Port Server Adapter S6102 5122 picturePositron Enhance Server PBX Circuit Board SIO 912303/8D 220-000210-401
$90.0
Positron Enhance Server PBX Circuit Board SIO 912303/8D 220-000210-401 picture






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