ScrollView Center vertically

import bb.cascades 1.0
Page {
    Container {
        background: style.bgColor
        Container {

            preferredWidth: Infinity
            background: style.black
            TopBar {
                id: bar
                layoutProperties: StackLayoutProperties {
                    spaceQuota: -1
                }
            }
            layoutProperties: StackLayoutProperties {
                spaceQuota: -1
            }
        }
        ScrollView {
            id: scrollView
            verticalAlignment: VerticalAlignment.Center
            Container {
                leftPadding: 20
                rightPadding: 20
                bottomPadding: 20
                topPadding: 20
                layout: StackLayout {
                    orientation: LayoutOrientation.TopToBottom
                }

                TextField {
                    inputMode: TextFieldInputMode.NumbersAndPunctuation
                    hintText: qsTr("accountNumber") + Retranslate.onLocaleOrLanguageChanged
                }
                TextField {
                    inputMode: TextFieldInputMode.NumbersAndPunctuation
                    hintText: qsTr("accountNumber") + Retranslate.onLocaleOrLanguageChanged
                }
                TextField {
                    inputMode:  TextFieldInputMode.NumbersAndPunctuation
                    hintText: qsTr("customerId") + Retranslate.onLocaleOrLanguageChanged
                }
                TextField {
                    inputMode:  TextFieldInputMode.PhoneNumber
                    hintText: qsTr("mobileNumber") + Retranslate.onLocaleOrLanguageChanged
                }
                TextField {
                    inputMode:  TextFieldInputMode.Text
                    hintText: qsTr("dateOfBirth") + Retranslate.onLocaleOrLanguageChanged
                }
                TextField {
                    inputMode: TextFieldInputMode.Text
                    hintText: qsTr("userName") + Retranslate.onLocaleOrLanguageChanged
                }
                Button {
                    text: qsTr("submit") + Retranslate.onLocaleOrLanguageChanged
                    preferredWidth: Infinity
                    onClicked: {
                        alkhaliji.login();
                    }
                }

            }

            scrollViewProperties {
                scrollMode: ScrollMode.Vertical
            }
        }
    }
}

I have this form, which the user must fill. My problem here is I want the scrollview in the middle of the screen.

Q10, it makes no difference there top and padding 20. But the z10 since the screen is large, it takes top padding low 20.but padding it takes the entire bottom of the screen. I won't be centered vertically in z10.

Solved this way

 Container {
            layout: DockLayout {

            }

        ScrollView {
            id: scrollView 

            verticalAlignment: VerticalAlignment.Center

Tags: BlackBerry Developers

Similar Questions

  • Center (vertically and horizontally)

    How do I Center (vertically and horizontally) a CC project lead in the browser?

    Google: Center horizontal vertical css

  • Flash Center vertically in the browser

    I have a problem my flash animation in the middle of the page - Center verically. It is centered horizontally, but I can't seem to Center vertically. How can I do this in Flash or Dreamweaver?

    Thank you!

    publish to 100% and affect ScaleMode (ScaleMode) step (as2) to be "noScale".

  • Center vertically to the horizontal Parallax

    Hi all

    I'm having a problem with my newly launched site. He worked at first, so I don't know where I took a wrong turn.

    Basically, I have a site of horizontal Parallax scrolling, but I really need to be centered vertically. Of course, I can't use pinning or alignment of suggestions by other posts on this subject.

    It is also not up to my anchor points, they all X = 0 and is not one for the landing in any case page.
    I also tried the widget which can be found here, nothing helps: http://musewidgets.com/products/center-page

    I understand that this site is not the most well designed site, I know also that it does not work unless you 1920 x 1080 as sensitive design has not been duly released yet resolutions.
    I would be really grateful for any help get it centered and work for all sizes above 1080 x 1920 however. Currently, it is only centered at the minimum size: http://www.pig-ment.com.au/

    Thanks for your time!

    I think that the problem is resolved because I checked out the site on my end and it shows very well with the central position of the page.

    Thank you

    Sanjit

  • Text to Center vertically in a text box

    I am trying to find a way to center the text vertically within a text box. So far, I was able to apply CSS to this text box by setting a class name and bind an external css file with different styles.

    Does anyone have any suggestions on a CSS property that works here, or perhaps another method that I have not discovered?

    I'll show you how to add a class on a screenshot in a previous post. Add that to all the text boxes you want on.

    Then just call him.

    SYM. $(".) ClassName"). VerticalAlign();

    Remember it must make one. front on the class name so if the class has been called "TextVert" you should have like

    SYM $(".) TextVert") .verticalAlign ();

  • Center vertically in Adobe Muse CC page

    Hello!

    I wonder how do I Center a page vertically in Muse CC.

    / JoakimN73

    Hello Joakim,

    There is no output from the solution of the box for this in Muse. However, if you are good with coding, you can write Java Script to do this.

    Kind regards

    Aish

  • The Center vertically with text bullet points

    CS6 in Windows 7. I made a custom point bullet which is a square, but it is aligned vertically with the bottom of the first line of the text rather than in the center of the first line of text. How to move the point upwards so it is aligned with the center of the first line of text?

    Here is how it is now.

    bullet points.jpg

    Thank you.

    Mark

    You can create a character style to apply to the ball which adds the vertical offset, or since you say that it is a custom chip, you can redo the ball and push it higher compared to the line when you do (which is a more universal solution).

  • Center vertically

    I'm developing a site mainly using Flash, I have this this site centered on the html page. I explored different methods, and it is relatively easy to focus on horizontally, but vertically seems a little more difficult.  I am currently using Dreamweaver CS3 and have this bit of script to Center my content:

    < div style = "width: 1000px;" height: 650px; left: 50%, margin-left:-500px; top: 50%; margin-top:-304px; background-color: #000000; position: absolute; ">

    This works very well when displayed at 1024:768 and more, but if the window browser is made smaller than the top of my content disappears, with no scroll bar appearing to compensate, losing the navigation and logo. Is there a way to make the content appear centrall when displayed on a giant screen, but have the top and the left edge of the lock of content at the top and left of the browser when the window margin is smaller than the content?

    Thanks in advance, Dave

    Have a read of this:

    http://apptools.com/examples/tableheight.php

    I know he has a table, but it's probably the safest way to achieve what you're after reliable cross browser :-)

    --

    Nadia

    Adobe® Expert community: Dreamweaver

    --------------------------------------------------

    Unique templates CSS | Tutorials | SEO articles

    http://www.DreamweaverResources.com

    --------------------------------------------------

    Book: Ultimate CSS reference

    http://www.SitePoint.com/launch/005dfd4/3/133

    ---------------------------------------------------

    http://Twitter.com/nadiap

  • Text to Center vertically in the Division

    I need Center the text vertically in the div at the bottom of this page. How to achieve this? I searched this forum, but couldn't find anything about it.
    http://www.liquidfirefishing.com/OCMC

    You guessed it!

  • Project Captivate Center vertically on the web page

    If anyone knows how to change the HTML code to make a sensitive 8 published Captivate project vertical displays centered on a web page, I would be very happy if you would help.

    Hi Jay

    I hope it is not too late to be of any use to you. I just entered Captivate 8 some time ago and found this annoying problem myself. I'm pretty shocked, there isn't a setting for this in the publication options. I posted another question on the forums about this myself. After fiddling around with the code, however, I did come up with something that works. Changing the code is in a different place depending on whether you are doing a project admissible or inadmissible. This is what is...


    The General steps (for each type of project)...

    1. Publish the project
    2. Open the "index.html" file in a text editor or code
    3. Replace a small css inline (code below)
    4. Save the index.html file

    Code to replace (to a sensitive project):

    Upward between theTags, there is a ton of content barfed in the function "cpInit()". Find this piece of code within this function:

    id='project_container' style='left:0px; top:0px; width:100%; height:100%; position:absolute; overflow:hidden;'

    Change the properties of this style:

    id='project_container' style='position:relative; top:50%; transform:translateY(-50%); overflow:hidden;'

    Code to replace (for a 'white' project does not answer):

    Always to the top between thetags in the function "cpInit()". Find this piece of code within this function:

    id='main_container' style='top:0px;position:absolute;'

    Change the properties of this style:

    id='main_container' style='position:relative; top:50%; transform:translateY(-50%);'

    I did have the chance to test a fully built project to see if something becomes wobbly at one point because of the position of the absolute by report - div but I don't see something bad happening so far. The table of contents still slides normally and all that jazz. I hope this helps!

  • Center (bb10) vertically on the label text

    Hi guys!

    Is there a way to vertically Center the text on the label?

    Suppose you have a label with heithg = 200 and I want to Center vertically.

    Is this possible?

    I think that there is no such thing as a valign, or almost, but if you set the height of the label on the actual height of the text you can then focus on it vertically by applying equal and the margin down (if you use layoutData) or something like

    myLabel.y = (availableHeight - myLabel.height) / 2...

    Note that you can not get the height of the text until the label is rendered or less placed in the display list (otherwise, it returns 0)

    myLabel.validateNow();
    myLabel.height = myLabel.textHeight;
    

    My app: Get set - get up!   Get ready for the revolution snooze.

  • Text 'Vertical Align Center' and a form

    Hello developers,

    I wonder if someone could give me a hand with the alignment of text and forms? I want to align a number at the center of a circle. "Horizontal center alignment" works well. "Center vertical alignment", however, does not give the desired result. The number turns out to be higher in the cycle (see figure below). The distance between the top of the circle to the top of the number zero, X, is shorter than the distance between the bottom of the circle and the lower part of the number zero. Is it possible for these two distances equal?

    Capture - Copy.PNG

    Figure 1: Results of Vertical focus

    Thank you

    Haobo

    Vectorize the text and align it. Editable text is aligned based on the em box, which determines the alignment of the character, not only the visible contours...

    Mylenium

  • Impossible to vertically Center the text in the rectangle with rounded corners

    Hi, I use InDesign CS4 on my Mac.  I want to confirm if it is possible or not to Center vertically the text in a rectangle rounded.  So far, it seems that if I change the corner on a rectangle options, InDesign will change the vertical justification to the top of the alignment page.

    Someone else has done this successfully?  Thank you!

    You need to change the inset to match or exceed the rounding RADIUS.

    Bob

  • Problem with the placement of components in the Center

    I have the screen or full-screen and four ButtonField. How can I put buttons to this container in the Center (vertically and horizontally)?

    I try to use the Field.FIELD_HCENTER flag. ButtonField.HCENTER | Field.FIELD_VCENTER | ButtonField.VCENTER for buttons, but they take only horizontal center

    I struggled with this before as well.  Here's what I found to work for a single centering element:

    VerticalFieldManager vfm = new VerticalFieldManager(VerticalFieldManager.USE_ALL_WIDTH | VerticalFieldManager.NO_HORIZONTAL_SCROLL | VerticalFieldManager.NO_VERTICAL_SCROLL);
    
    // Create a horizontally centered HFM
    HorizontalFieldManager hfm = new HorizontalFieldManager(HorizontalFieldManager.USE_ALL_HEIGHT | HorizontalFieldManager.NO_HORIZONTAL_SCROLL | HorizontalFieldManager.NO_VERTICAL_SCROLL | HorizontalFieldManager.FIELD_HCENTER);
    
    // Create a vertically centered label
    LabelField label = new LabelField("Test", LabelField.FIELD_VCENTER);
    hfm.add(label);
    
    vfm.add(hfm);
    add(vfm);
    

    You should be able to extend this to do what you want to do with an another VerticalFieldManager.

    T

  • Align vertically an object in the browser window.

    Hello

    I searched the previous posts on this subject, and I have not found an answer.

    I need to align vertically an object in my browser window. Here is an example: http://www.adgcomunicacao.com.br/valign/

    How is that possible? The PIN options only let me PIN to low or high, but not the vertical center!

    Capture d’écran 2016-02-19 à 16.31.35.png

    Where is the button?

    Thank you!

    Chris.

    Well, I'll be more specific: There is no Center vertically to window option in Muse.

    The only element that centers vertically, is the Lightbox slideshow/Composition widget.

Maybe you are looking for

  • No care with applecare

    So here in Barbados, able to spend 6 months here at once and then back to the United Kingdom. But today for the first time in about 6 iterations of the iPhone, I just dropped it and the screen needs to be replaced. The cost of the AppleCare to the Un

  • When I call someone on Skype 7.0.0.102 I freeze

    I get a grey box and I have to force shutdown my computer im running windows 8.1

  • HP Deskjet all-in - One 1051 registers as an all-in-one Deskjet 1050

    Recently bought a HP all-in-one Deskjet 1051.  After you have installed on the computer, he enrolled as a series of J410 Deskjet 1050 all-in-One.  I was wondering why.

  • W3 Virtual keyboards

    Hello, I think I've seen a keyboard with keys F when I first got my W3. Now I don't see one. I like F2 and F11. Does anyone know how to get the F keys on a virtual keyboard?

  • SC24 Case for Z3

    Hi, can anyone tell how I can view and read text messages received in the coverage of smart window on my Z3 window? He states clearly here http://www.sonymobile.com/global-en/products/Accessories/style-cover-SCR24/ It is a characteristic yet all I ge