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

Native Development

Reply
Developer
Shwarup
Posts: 93
Registered: ‎08-18-2011
My Device: 9550
Accepted Solution

Hide Application menu for a screen

Hi Guys,

 

I don't want to display application menu for all screen. So, How can i hide it for a particular screen.

 

I tried with bellow code but it is not helping

Application.menuEnabled = false;

 Is there any way we can hide it for a particular screen?

 

 

Thanks,

Shwarup Biswas
Developer
Zmey
Posts: 1,512
Registered: ‎12-18-2012
My Device: PlayBook, Z10, DAC

Re: Hide Application menu for a screen

[ Edited ]

Hi,

 

I've been using Application::instance()->setMenuEnabled() in C++, but it should work in QML too. The command above seems to be correct. Is it being ignored? 

 

You'll have to re-enable the menu when hiding the screen, for example in onPopTransitionEnded if using NavigationPane.


Andrey Fidrya, @zmeyc on twitter
Developer
peter9477
Posts: 6,473
Registered: ‎12-08-2010
My Device: PlayBook, Z10

Re: Hide Application menu for a screen

I can confirm that using the OP's code in QML has always worked fine for me. If it's not in his case, it's something about when (or whether) that code is actually being executed which is the problem, not the line itself.

(Note that it is a global property though, so it won't handle "a particular screen" without separate logic related to tracking which screen is visible.)

Peter Hansen -- (BB10 and dev-related blog posts at http://peterhansen.ca.)
Author of White Noise and Battery Guru for BB10 and for PlayBook | Get more from your battery!
Developer
ekke
Posts: 1,571
Registered: ‎04-08-2010
My Device: Z10 (red Limited Edition), Q10, Z30
My Carrier: Telekom.de, O2, Vodafone

Re: Hide Application menu for a screen

doing this in some cases without any problem from QML

as Zmey wrote, you can do this with NavigationPane:

if specific Page pushed, disable and if onPopTransitionEnded() for this Page, re-enable it

or on TabbedPane you have to check when active Tab changes

-------------------------------------------------------------------------------
ekke (independent software architect, rosenheim, germany)

BlackBerry Elite Developer
BlackBerry Platinum Enterprise Partner
International Development Mobile Apps BlackBerry 10 Cascades
Cascades - Workshops / Trainings / Bootcamps

blog: http://ekkes-corner.org videos: http://www.youtube.com/user/ekkescorner http://vimeo.com/ekkescorner/videos
bb10-development: http://appbus.org Twitter: @ekkescorner
Developer
Shwarup
Posts: 93
Registered: ‎08-18-2011
My Device: 9550

Re: Hide Application menu for a screen

Hi Guys,

 

Thanks for your suggestion.

 

And  thanks Zmey. Using "Application::instance()->setMenuEnabled()" code I able to handle the situation.

 

 

Thanks,

Shwarup Biswas