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: 24
Registered: ‎10-31-2012
My Device: Dev Alpha B
My Carrier: COMPE

[Help] Open NavigationPane in other qml

Helo guys,

 

I need a open NaviPane.qml(NavigationPane) in main.qml. Lest's go.

 

My main.qml

import bb.cascades 1.0

Page {
    Container {
        ListView {
            dataModel: XmlDataModel {
                source: "models/opens.xml"
            }
            listItemComponents: [
                ListItemComponent {
                    type: "titles"
                    Header {
                        title: ListItemData.bar
                    }
                },
                ListItemComponent {
                    type: "contacts"
                    Container {
                        property variant Focus: ListItem.active
                        id: mlist
                        layout: DockLayout {
                        }
                        Label {
                            id: nameColor
                            text: ListItemData.title
                            textStyle.fontSizeValue: 10
                        }
                        attachedObjects: [
                            ComponentDefinition {
                                id: myNPane
                                source: "NaviPane.qml"
                            }
                        ]
                        onFocusChanged: {
                            if (ListItem.active) {
                                var newPane = myNPane.createObject() //Don't working
navigationPane.push(newPane) //Don't working } } Divider { } } } ] } } }

 

My NaviPane.qml

import bb.cascades 1.0

NavigationPane {
    id: navigationPane
    Page {
        Container {
            layout: StackLayout {
            }
            background: Color.create("#f7f3")
            Label {
                text: "First page"
            }
            Button {
                text: "Test"
                horizontalAlignment: HorizontalAlignment.Fill
                verticalAlignment: VerticalAlignment.Fill
                onClicked: {
                    page.destroy();
                }
            }
        }
    }
}

 

someone has to solve this problem?

 

Gratefull,

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

__
Helped you? Like me.
Regular Contributor
Posts: 76
Registered: ‎07-31-2012
My Device: Blackberry
My Carrier: Vodafone

Re: [Help] Open NavigationPane in other qml

I would suggest you to take NavigationPane on top of application & later push pages.

Still there's a way to do. You can put NavigationPane in a sheet & open it.

 

 

Page{

    attachedObjects: [
      ComponentDefinition {
         id: sheet
         Sheet {
            NavigationPane {
               Page {
                  Label {
                     text: "Navigation Pane"
                  }
               }
            }
         }
      }
   ]

...

...

         onFocusChanged: {
            if (ListItem.active) {

               var newSheet = sheet.createObject()
               newSheet.open()

            }
         }

...

...

...

}

 

Regards,

Nishant Shah