Welcome to the CrackBerry Forums Create Your Account or Ask a Question Answers in 5 minutes - no registration required!
Results 1 to 5 of 5
Like Tree1Likes
  • 1 Post By travisredpath
  1. DisturbedRocks31's Avatar
    CrackBerry Addict

    Posts
    567 Posts
    Global Posts
    569 Global Posts
    Thread AuthorThread Author   #1  

    Default Scrolling

    Hi guys,

    Once again I find myself pwned

    I tried to make a container with a question, an image and 4 options. Then when I made another one of the previously mentioned container on the same page, I find myself unable to scroll down to the second container in the simulator. What do I use to fix this problem?

    Same problem with another one of my pages where I have lots of text displayed with Labels { }. Can't scroll down and the text just cuts off.... multiline is set to true!

    Code:
    // Tabbed Pane project template
    import bb.cascades 1.0
    Page {
        id: lola
        titleBar: TitleBar {
            title: "101"
        }
        content: Container {
            layout: StackLayout {}
            Label {
                text: qsTr("<main_question>")
            }
            Container {
                id: q1
                verticalAlignment: VerticalAlignment.Top
                horizontalAlignment: HorizontalAlignment.Center
                maxWidth: 700.0
                preferredWidth: 700.0
                layout: DockLayout {}
                minHeight: 1000.0
                Label {
                    text: "<put some random question here>"
                    multiline: true
                }
                ImageView {
                    imageSource: "asset:///images/name_structure.png"
                    horizontalAlignment: HorizontalAlignment.Center
                }
                RadioGroup {
                    Option {id: q1_answerOption1; text: "OPT" }
                    Option {id: q1_answerOption2; text: "OPT" }
                    Option {id: q1_answerOption3; text: "OPT" }
                    Option {id: q1_answerOption4; text: "OPT" }
                    translationY: 425.0
                }
            }
    
            
            Container {
                id: q2
                verticalAlignment: VerticalAlignment.Top
                horizontalAlignment: HorizontalAlignment.Center
                maxWidth: 700.0
                preferredWidth: 700.0
                layout: DockLayout { }
                minHeight: 1000.0
                Label {
                    text: "<another question>"
                    multiline: true
                }
                ImageView {
                    imageSource: "asset:///images/name_structure.png"
                    horizontalAlignment: HorizontalAlignment.Center
                }
                RadioGroup {
                    Option {id: q2_answerOption1; text: "OPT" }
                    Option {id: q2_answerOption2; text: "OPT" }
                    Option {id: q2_answerOption3; text: "OPT" }
                    Option {id: q2_answerOption4; text: "OPT" }
                }
            }
        }
    }
  2. Brian Scheirer's Avatar
    CrackBerry Abuser

    Posts
    194 Posts
    #2  

    Default

    Put everything inside of a ScrollView{}
    Check out my BB10 Cascades Coding Site: http://BBcascades.com/ Blog: http://bbcascadescode.tumblr.com/

    My Apps: The Dive Plan (Built for BlackBerry Approved) | Visual Connection | Combo Pics | Beer Math | Random Stories | Logic Puzzles
    Thanked by:
    DisturbedRocks31 (12-27-2012) 
  3. DisturbedRocks31's Avatar
    CrackBerry Addict

    Posts
    567 Posts
    Global Posts
    569 Global Posts
    Thread AuthorThread Author   #3  

    Default

    It's still not scrolling... I added the ScrollView and still the same thing :S


    Awesome blog, very useful when I was starting out!
  4. travisredpath's Avatar
    CrackBerry Abuser

    Posts
    212 Posts
    Global Posts
    214 Global Posts
    #4  

    Default

    Quote Originally Posted by bcs925 View Post
    Put everything inside of a ScrollView{}
    This should work.

    Code:
    // Tabbed Pane project template
    import bb.cascades 1.0
    Page {
        id: lola
        titleBar: TitleBar {
            title: "101"
        }
        content: ScrollView {
    	Container {
    	    layout: StackLayout {}
    	    Label {
    	        text: qsTr("<main_question>")
    	    }
    	    Container {
    	        id: q1
    	        verticalAlignment: VerticalAlignment.Top
    	        horizontalAlignment: HorizontalAlignment.Center
    	        maxWidth: 700.0
    	        preferredWidth: 700.0
    	        layout: DockLayout {}
    	        minHeight: 1000.0
    	        Label {
    	            text: "<put some random question here>"
    	            multiline: true
    	        }
    	        ImageView {
    	            imageSource: "asset:///images/name_structure.png"
    	            horizontalAlignment: HorizontalAlignment.Center
    	        }
    	        RadioGroup {
    	            Option {id: q1_answerOption1; text: "OPT" }
    	            Option {id: q1_answerOption2; text: "OPT" }
    	            Option {id: q1_answerOption3; text: "OPT" }
    	            Option {id: q1_answerOption4; text: "OPT" }
    	            translationY: 425.0
    	        }
    	    }
    	
    	        
    	    Container {
    	        id: q2
    	        verticalAlignment: VerticalAlignment.Top
    	        horizontalAlignment: HorizontalAlignment.Center
    	        maxWidth: 700.0
    	        preferredWidth: 700.0
    	        layout: DockLayout { }
    	        minHeight: 1000.0
    	        Label {
    	            text: "<another question>"
    	            multiline: true
    	        }
    	        ImageView {
    	            imageSource: "asset:///images/name_structure.png"
    	            horizontalAlignment: HorizontalAlignment.Center
    	        }
    	        RadioGroup {
    	            Option {id: q2_answerOption1; text: "OPT" }
    	            Option {id: q2_answerOption2; text: "OPT" }
    	            Option {id: q2_answerOption3; text: "OPT" }
    	            Option {id: q2_answerOption4; text: "OPT" }
    	        }
    	    }
    	}
        }
    }
  5. DisturbedRocks31's Avatar
    CrackBerry Addict

    Posts
    567 Posts
    Global Posts
    569 Global Posts
    Thread AuthorThread Author   #5  

    Default

    Yeahhh that worked! Thanks a lot!

Similar Threads

  1. scrolling-question
    By prosport in forum BlackBerry 8830 WE
    Replies: 3
    Last Post: 08-28-2007, 09:10 PM
  2. Scroll Left/Right?
    By tessa1175 in forum Introductions
    Replies: 1
    Last Post: 07-11-2007, 07:19 AM
  3. Scroll Ball
    By adianshadows in forum BlackBerry Curve 83xx
    Replies: 1
    Last Post: 07-08-2007, 02:42 PM
  4. scroll wheel issue
    By nappynad in forum BlackBerry 8800, 8820
    Replies: 2
    Last Post: 06-30-2007, 12:18 AM
  5. Scrolling through photos on a Curve
    By monkeypack in forum BlackBerry Curve 83xx
    Replies: 4
    Last Post: 06-18-2007, 04:55 PM

Posting Permissions