Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Reply
Developer
redpath
Posts: 62
Registered: ‎07-29-2008
My Device: Not Specified

Custom Field keyPressed Numeral only

I am tsting on a 8700 and a 8110 and I have a custom Field which accepts numbers only

I thought I would listen to the keycodes. I want the user to be able to press the keypad without 

ALT on for the numbers and assume numeral input. The keycodes ar enot good since keycode (9/c) 8700

the  keycode  (7,c,v) on a 8110  which means you get a 7 not a 9 from the field. So what is appropriate.

I tried to trap th character instead but the keybaords are different and 'C' is on 9 for 8700 and 'c' is on 7 for

a 8110.

 

Just want a custom "Field" that accepts numeric input without having to use ALT on any device.

 

 

 

Please use plain text.
Developer
RexDoug
Posts: 4,764
Registered: ‎07-21-2008
My Device: Not Specified

Re: Custom Field keyPressed Numeral only

How about BasicEditField with the filter set to FILTER_NUMERIC ?

 

 

Please use plain text.
Developer
redpath
Posts: 62
Registered: ‎07-29-2008
My Device: Not Specified

Re: Custom Field keyPressed Numeral only

Its not a text field in any sense? Think I can extend the BasicField instead of extending Field?

 

Please use plain text.
Developer
redpath
Posts: 62
Registered: ‎07-29-2008
My Device: Not Specified

Reply: Custom Field keyPressed Numeral only use BasicEditField worked

Hey that worked, I also had to override the makecontext to rid myself of the multitap menu item.

 

Thanks

Please use plain text.