BlackBerry Forums Support Community               

Closed Thread
 
LinkBack Thread Tools
Old 06-01-2009, 08:29 AM   #1 (permalink)
New Member
 
Join Date: Apr 2009
Model: 8800
PIN: N/A
Carrier: Software developer
Posts: 14
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default Appear context menus when displaying the screen

Please Login to Remove!

Hi,
I developed a simple blackberry application by extending MainScreen. There I have added few RadioButtonFields to a RadioButtonGroup. When I display this screen by clicking the trackball, a context menu appears as "Change Option". But if I clicked Enter it won't appear. I don't need to display this menu when the screen is displayed. Could any one help me to resolve this? I'm using BlackBerry JDE 4.2.1.
Offline  
Old 06-01-2009, 11:01 AM   #2 (permalink)
Talking BlackBerry Encyclopedia
 
Join Date: Oct 2006
Model: 7103
Carrier: Verizon
Posts: 259
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

if I understand your problem, you want 'Enter' to work just like 'trackwheel click' ? If so, you will want to define a class that extends screen and implement your own keyChar method to do something like


Code:
protected boolean keyChar(char character, int status, int time)
{
switch(character):
{
case 'Characters.ENTER': 
//makeMenu or makeContextMenu
break;
}
}
Offline  
Old 06-02-2009, 12:57 AM   #3 (permalink)
New Member
 
Join Date: Apr 2009
Model: 8800
PIN: N/A
Carrier: Software developer
Posts: 14
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi bemshaswing,

Thanks for the reply. My problem was when I click a Button Field from trackball to display the screen having radiobuttons, "Change Option" menu also appear with the screen. However I managed to solve this problem by adding,

ButtonField.CONSUME_CLICK

property to the Style of the Button Field.

Thanks again for your answer

-Kelum-

Last edited by kelumkps : 06-02-2009 at 01:01 AM.
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.