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
Super Contributor
Meghasanghvi
Posts: 306
Registered: ‎08-10-2010
My Device: Not Specified
Accepted Solution

Push Tabbed pane from abstract pane(Page)

Hi,

In my application i have main page which have 3 buttons. When user click on any of the one button user redirect to the screen which have a tabbed pane.

 

My main page is Abstract pane and have Page as its child object. Now i want to push tabbed pane on button click.

Is it possible to do if yes then how we can implement that?

 

Thanks,

Megha

Please use plain text.
BlackBerry Development Advisor
erahnenfuehrer
Posts: 85
Registered: ‎05-25-2012
My Device: Limited Edition Z10
My Carrier: Bell

Re: Push Tabbed pane from abstract pane(Page)

Hi Megha, that can be accomplished using a Sheet in Cascades.  Below is some sample code that shows how:

 

NavigationPane {
    id: navigationPane
    Page {
        Container {
            layout: StackLayout {
            }
            Button {
                text: "New Sheet"
                onClicked: {
                    sheet.open();
                }
            }
            attachedObjects: [
                Sheet {
                    id: sheet
                    TabbedPane {
                        showTabsOnActionBar: true
                        Tab {
                            title: "Home"
                            Page {
                                id: page1
                                Label {
                                    text: "Tab 1"
                                }
                            }
                        }
                        Tab {
                            title: "Options"
                            Page {
                                id: page2
                                Label {
                                    text: "Tab 2"
                                }
                            }
                        }
                        Tab {
                            title: "Help"
                            Page {
                                id: page3
                                Label {
                                    text: "Tab 3"
                                }
                            }
                        }
                    }
                }
            ]
        }
    }
}

 

 

Please use plain text.