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

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.

Posts: 490
Registered: ‎07-16-2008
My Device: Not Specified
Accepted Solution

Menu does open when push trackball button' is it right ?

Hello guys'


I've made several menus for my application.This is my source code for making menu :



private class SimpleScreen extends MainScreen { .... public SimpleScreen() { .... } private MenuItem _menu1 = new MenuItem("Menu 1", 100000,10) { public void run() { ... } }; private MenuItem _menu2 = new MenuItem("Menu 2", 200000,10) { public void run() { ... } }; protected void makeMenu( Menu menu, int instance ) { menu.add(_menu1); menu.add(_menu2); super.makeMenu(menu, instance); } }


Then I run the application, I saw menu items when push on BlackBerry button. It is OK, no problem.

And while I push on trackball button (I try to mean trundle button on center of BB.) , opens menu items.


Why does menu open when push on trackball button ? Is it working right ? I want to make it only when push on BlackBerry button. 

I am using BlackBerry JDE 4.2.1 simulator(BB 8800).

Tnx all guys


Posts: 1,041
Registered: ‎07-16-2008
My Device: ಠ_ಠ

Re: Menu does open when push trackball button' is it right ?

[ Edited ]
The menu is meant to open if the trackball/wheel click is not consumed. If you consume the trackball click by overriding trackwheelClick() and returning true, the menu won't open. You probably want to call super.trackwheelClick() first, but still return true manually.
Message Edited by mreed on 08-24-2008 10:15 PM
Posts: 490
Registered: ‎07-16-2008
My Device: Not Specified

Re: Menu does open when push trackball button' is it right ?

Tnx man' It is working fine.