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
Highlighted
New Developer
Posts: 1
Registered: ‎10-29-2008
My Device: Not Specified

9500 and 9500 VirtualKeyboardControl

I'm working on an applicaion that is written in J2ME and uses the Canvas class for rendering a custom UI.  I have my own Textbox controls and DO NOT use the RIM or J2ME textBox's.  I changed my Canvas class to derive from BlackBerryCanvas so i could get access to the VirtualKeyboardControl,  this gives me the ability to show and hide the keypad like i want.  but is there anyway to change the style of the keypad.  for example in the (J2ME) TextBox i can set constraints field and change the keyboard layout.  i want similar functionality for my class that is derived from BlackBerryCanvas.

 

Thanks,

BlackBerry Development Advisor
Posts: 15,784
Registered: ‎07-09-2008
My Device: BlackBerry PRIV
My Carrier: Bell

Re: 9500 and 9500 VirtualKeyboardControl

If you are referring to the input type (i.e. numeric versus text input) then this is not supported from a BlackBerryCanvas.
Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.
Found a bug? Report it using Issue Tracker
Developer
Posts: 22
Registered: ‎10-30-2008
My Device: Not Specified

Re: 9500 and 9500 VirtualKeyboardControl

[ Edited ]

What's the String needed to retrive VirtualKeyboardControl from BlackBerryCanvas?

 

String vkbControlString = "???";

VirtualKeyboardControl vkvctrl = (VirtualKeyboardControl)getControl(vkbControlString);

 

Thx

 

Message Edited by hpedroza on 11-03-2008 04:55 PM
BlackBerry Development Advisor
Posts: 15,784
Registered: ‎07-09-2008
My Device: BlackBerry PRIV
My Carrier: Bell

Re: 9500 and 9500 VirtualKeyboardControl

These are obtained by using the getControls and/or getControl methods of the Controllable class.
Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.
Found a bug? Report it using Issue Tracker
Developer
Posts: 22
Registered: ‎10-30-2008
My Device: Not Specified

Re: 9500 and 9500 VirtualKeyboardControl

Thank you Mark.

 

I tested this and it worked as expected:

 

Control control = getControl("net.rim.device.api.lcdui.control.VirtualKeyboardControl");
if (control instanceof VirtualKeyboardControl) {
vkbControl = (VirtualKeyboardControl)control;
}

 


 

I was missing the fully qualified name of the class.