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
Posts: 652
Registered: ‎10-08-2009
My Device: Bold 9900

addMenuItem on screen

Hi, java n00by here.

 

I've used addMenuItem(custom menu item) in the past to add custom menu item to my MainScreen.

 

However, the project I am currently working on extends Screen instead of MainScreen. On this, I am unable to pull up menu item in whole. When I press the BlackBerry button (Insert key) on simulator, I don't see any MenuItem popping up.

 

How do I get the basic menu item pop up and how do I add custom menu item like how I was able to do to MainScreen?

 

Thanks for much help!

 

 

----------------------------------------------------------
Twitter: @gyubok
Contributor
Posts: 23
Registered: ‎02-22-2011
My Device: Not Specified

Re: addMenuItem on screen

You need to override makeMenu. This article is pretty useful: http://www.slashdev.ca/2008/05/07/menuitem-demystified/ (even though I hope there is a better way to deal with ordinals)

Developer
Posts: 652
Registered: ‎10-08-2009
My Device: Bold 9900

Re: addMenuItem on screen

Hey thanks for giving me that link, it was very useful.

 

I still have a question though: When a screen is extended, is it normal for menu item to be disabled? I only ask because I can't pull up the menu item using the menu button and I don't know why :smileysad:

----------------------------------------------------------
Twitter: @gyubok