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
Highlighted
New Developer
Posts: 6
Registered: ‎08-28-2008
My Device: Not Specified
Accepted Solution

How to close menu which is open when we click on menu button?

Hi,

When user presses menu button, menu pops up. 

Now menu is not closed & my screen behind the menu is updated because of some callback function.

So i want to update my menu again accordingly.

How can i update that menu or close the menu which is open?

Is there any way of diong that?

BlackBerry Development Advisor
Posts: 15,784
Registered: ‎07-09-2008
My Device: BlackBerry PRIV
My Carrier: Bell

Re: How to close menu which is open when we click on menu button?

You can override makeMenu of MainScreen to get a copy of the current Menu.  You can then call Menu.close to close the menu.
Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.
Found a bug? Report it using Issue Tracker
New Developer
Posts: 6
Registered: ‎08-28-2008
My Device: Not Specified

Re: How to close menu which is open when we click on menu button?

Yes.. Its working.

I tried this priviously as well, but it was not working in multithreading where i wanted to close menu on response from one or two threads.

It needed to aquire application event lock to close menu in that senario.

 

Thnx , it is solved now..