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
New Developer
Posts: 28
Registered: ‎07-17-2012
My Device: LE / DevAlphaC
My Carrier: vodafone

need to Push a stack of page from tabbed pane

hey guys 

I've been searching for quite a while but never found a good solution for my issue

 

i have tabbed pane and need to push several pages onto it.

 

just see it like i have a page that has a button and that button shall push a new page containing a back button to it. (the page I want to push will look like the cascades cook book.

 

any idea how to do this in qml? 

 

 

interested in current apps?

http://appworld.blackberry.com/webstore/vendor/58298
Developer
Posts: 6,473
Registered: ‎12-08-2010
My Device: PlayBook, Z10
My Carrier: none

Re: need to Push a stack of page from tabbed pane

TabbedPane itself doesn't provide a stack like that. It can, however, have a NavigationPane as its active pane, so if you make your tabs use NavigationPane instead of Page, then you can push additional pages onto them at any time.

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!
New Developer
Posts: 28
Registered: ‎07-17-2012
My Device: LE / DevAlphaC
My Carrier: vodafone

Re: need to Push a stack of page from tabbed pane

ok and how is foursquare or the crackberry app doing it? 

 

Is it possible to have a navpane and place tabs on it?

interested in current apps?

http://appworld.blackberry.com/webstore/vendor/58298
Developer
Posts: 6,473
Registered: ‎12-08-2010
My Device: PlayBook, Z10
My Carrier: none

Re: need to Push a stack of page from tabbed pane

I'm fairly sure both those apps do it exactly as I've described. It's not at all difficult to do it that way.

And it's not possible to have tabs on a NavigationPane, at least not and have them look like tabs on BB10. You could fake something with ActionItems I suppose, but it wouldn't feel the same to a user.

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!
New Developer
Posts: 28
Registered: ‎07-17-2012
My Device: LE / DevAlphaC
My Carrier: vodafone

Re: need to Push a stack of page from tabbed pane

just had a look at "weather guesser" app and saw that it can handle something like that. 

question now is: 

 

is it just able to handle that because of the data modle in the back or how is it doing it?

interested in current apps?

http://appworld.blackberry.com/webstore/vendor/58298
Developer
Posts: 6,473
Registered: ‎12-08-2010
My Device: PlayBook, Z10
My Carrier: none

Re: need to Push a stack of page from tabbed pane

I don't have it installed, so you can describe the sequence you're using to make it do whatever it is you're seeing?

The source is online so it should be easy enough for me to explain how it's doing it once you describe that: https://github.com/blackberry/Cascades-Samples/tree/master/weatherguesser/assets

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: 41
Registered: ‎02-06-2013
My Device: Developer - BB10 Dev B
My Carrier: Rogers

Re: need to Push a stack of page from tabbed pane

Don't mind the messy code from a test I had earlier. This is a tabbed pane based app where some tabs have dig down navigation in them (mostly lists)

 

main.qml

TabbedPane{
    ....
    Tab {
        title: qsTr("Test Nav pane tab")

        NavigationPane {
            id: navPane
            Page {
                id: dig1
                Container {
                    Button {
                        text: "Forward"
                        onClicked: {
                            navPane.push(dig2);
                        }
                    }
                }
            }
            attachedObjects: [
                Page {

                    id: dig2
                    titleBar: TitleBar {
                        title: "Page 2, keep going"

                    }
                    Container {
                        Button {
                            onClicked: {
                                navPane.push(dig3)
                            }
                        }
                    }
                },
                Page {
                    id: dig3
                    Container {
                        Label {
                            text: "Success"
                        }
                        
                        ListView {
                            id: testList

                        }
                    
                    }
                }
            ]
        }
}