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. New to the forum? Please visit the ‘Getting Started’ link below.
inside custom component

Java Development

Reply
Trusted Contributor
babakar
Posts: 223
Registered: ‎05-29-2012
My Carrier: 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?

Please use plain text.
Regular Contributor
milan555
Posts: 52
Registered: ‎07-04-2011
My Carrier: Developer

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,

Please use plain text.
Trusted Contributor
babakar
Posts: 223
Registered: ‎05-29-2012
My Carrier: 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
Please use plain text.
Developer
RexDoug
Posts: 4,764
Registered: ‎07-21-2008

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);

}

 

Please use plain text.