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


Thank you for visiting the BlackBerry Support Community Forums.

BlackBerry will be closing the BlackBerry Support Community Forums Device Forums on April 1st (Developers, see below)

BlackBerry remains committed to providing excellent customer support to our customers. We are delighted to direct you to the CrackBerry Forums, a well-established and thorough support channel, for continued BlackBerry support. Please visit http://forums.crackberry.com or http://crackberry.com/ask. You can also continue to visit BlackBerry Support or the BlackBerry Knowledge Base for official support options available for your BlackBerry Smartphone.

"When we launched CrackBerry.com 10 years ago, we set out to make it a fun and useful destination where BlackBerry Smartphone owners could share their excitement and learn to unleash the full potential of their BlackBerry. A decade later, the CrackBerry community is as active and passionate as ever and I know our knowledgeable members and volunteers will be excited to welcome and assist more BlackBerry owners with their questions."

- Kevin Michaluk, Founder, CrackBerry.com

Developers, for more information about the BlackBerry Developer Community please review Join the Conversation on the BlackBerry Developer Community Forums found on Inside BlackBerry.


Reply
Developer
Posts: 93
Registered: ‎08-18-2011
My Device: 9550
My Carrier: At&T
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
Posts: 1,524
Registered: ‎12-18-2012
My Device: Z30, Z10 LE, DevAlpha C, PlayBook

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
Posts: 6,473
Registered: ‎12-08-2010
My Device: PlayBook, Z10
My Carrier: none

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
Posts: 1,746
Registered: ‎04-08-2010
My Device: Passport Silver, PRIV
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 native Mobile Business Apps
BlackBerry 10 | Qt Mobile (Android, iOS)
Workshops / Trainings / Bootcamps

blog: http://ekkes-corner.org
mobile-development: http://appbus.org Twitter: @ekkescorner
Highlighted
Developer
Posts: 93
Registered: ‎08-18-2011
My Device: 9550
My Carrier: At&T

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