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: 781
Registered: ‎05-29-2012
My Device: see later

ADDMENUITEM

HI ALL, I Have in my blacberry application  pictures in the first page.

 

In case picture is focused I want to show him a certain menu on click.

In case the picture is not focused I show him different menus on menu click.

 

can it be done? how?

Regular Contributor
Posts: 52
Registered: ‎07-04-2011
My Device: Bold-3

Re: ADDMENUITEM

Hi,

I can not understand what you try to say.

So ask your query in simple way.

So any one can give its answer easily.

 

Regards,

Developer
Posts: 781
Registered: ‎05-29-2012
My Device: see later

Re: ADDMENUITEM

Hmm okey. You have the menu options on each page in blackberry.You add to the menu using addmenuitem function.

Now we are on page 1. I click on menus , it shows me the menus i added.What I want to do , on same page to show different menus based where the user is. If focused on a picture i show him menu's 1 2 3...if not focused i show him menu's close delete sthg etc etc
Developer
Posts: 4,764
Registered: ‎07-21-2008
My Device: Not Specified

Re: ADDMENUITEM

You need to override makeMenu() in your screen class.

 

In that method, you'll test for the specific condition and add (or not add) your menu item as required.

 

if (<condition>) {

  menu.add(menuItem);

}