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
simon_hain
Posts: 16,282
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport

Re: Get default back button on separate sheet

The objectName approach works, thanks for pointing out the difference between id and objectName.

As this is a bit tricky, here is my code (for further reference):

In my Preferences.qml:

Page {
    objectName: "preferences"

 and on the NavigationPane of main.qml:

onTopChanged: {
  if (page.objectName == "preferences") {
      Application.menuEnabled = false
   } else {
      Application.menuEnabled = true
  }
}

(which can, of course, be shortened, but i like to write stuff a bit longer for better access)

 

 

----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter