Thank you for visiting the BlackBerry Support Community Forums.
BlackBerry will be closing the BlackBerry Support Community Forums Device Forums on April 1st (Developers, see below)
BlackBerry remains committed to providing excellent customer support to our customers. We are delighted to direct you to the CrackBerry Forums, a well-established and thorough support channel, for continued BlackBerry support. Please visit http://forums.crackberry.com or http://crackberry.com/ask. You can also continue to visit BlackBerry Support or the BlackBerry Knowledge Base for official support options available for your BlackBerry Smartphone.
"When we launched CrackBerry.com 10 years ago, we set out to make it a fun and useful destination where BlackBerry Smartphone owners could share their excitement and learn to unleash the full potential of their BlackBerry. A decade later, the CrackBerry community is as active and passionate as ever and I know our knowledgeable members and volunteers will be excited to welcome and assist more BlackBerry owners with their questions."
- Kevin Michaluk, Founder, CrackBerry.com
Developers, for more information about the BlackBerry Developer Community please review Join the Conversation on the BlackBerry Developer Community Forums found on Inside BlackBerry.
02-23-2010 06:18 AM
I am using Object choice field and an image.
I want to open ObjectChoiceField choices on the navigationclick event of an image.
How can i achieve this? Plz help me.
Thanks and Regards
02-23-2010 11:02 PM
Please someone help...
02-23-2010 11:12 PM - edited 02-23-2010 11:12 PM
You have an image that when pressed (trackball or screen) will pop open an ObjectChoiceField for the user to choose an option.
You'd need to use a BitmapField and add it to your screen. On navigationClick event, you would then pop an ObjectChoiceField in a dialog (a dialog is, after all, just another screen with some extra options).
If you just need to select a choice, on the navigationClick just use Dialog.ask (simplest way).
02-24-2010 12:15 AM
I have not done it, but I think we can do it by on selection of the image we set focus on the objectchoicefield and with the help of Event Injection (EventInjector.TrackwheelEvent) you can apply THUMB_CLICK event to open this choice field.
Thanks & regards,
02-24-2010 03:23 AM - edited 02-24-2010 03:27 AM
Use ObjectChoiceFiled with one element providing the layout width & height as desired and background set using setBackground. When the element gets clicked, reset the list to the options as desired using setChoices.
02-24-2010 05:02 AM
If the Event Injector method does not work, or you don't want to ask the user for permission for Input Simulation, you might try this method which I remember seeing in a previous forum entry. I have not tried it myself.
Basically ask the ObjectChoiceField for its contextmenu.
ContextMenu cm = <objectChoiceField>,getContextMenu();
Then I think the default option in the Context menu is the one to 'Change Options',
MenuItem mi = cm.getDefaultmenu();
So you run the default menu item.
I would set Focus on the ObjectChoiceField first.
02-24-2010 05:52 AM
Hi all, Thanx for replying.
In this ALL is an objectChoiceField and arrow is a bitmapfield.
On click of an image, i want objectchoicefield to open.
I have tried the following code: But its not working as expected
objectSymbol = new ObjectChoiceField("",symbolStrings,0,Field.FIELD_L
protected void fieldChangeNotify(int context)
index = getSelectedIndex();
protected void layout(int width, int height)
width = SizeSpec.ChoiceWid;
height = SizeSpec.ChoiceHgt;
symbolImage = new BitmapField(downArrow.getBitmap(),BitmapField.FOCU
protected boolean navigationClick(int status,int time)
02-24-2010 06:23 AM
In future when you say "not working as expected" can you tell us what it is doing?
In this case I suspect nothing, because you have not used all the code I gave you.
I suggest you review my post again, looking at all the code.
But before your put the code in your program, look carefully at what is going on so you understand what the processing is actually doing. The code in your program should not be some magic incantation that you recite, You should understand it and what it is actually doing. If you don't understand it, you will never figure out what to do if it doesn't work or breaks will you!