3 Replies Latest reply on Jul 15, 2013 8:14 PM by Flex harUI

    scroll specific child into view


      I had aleady post the issue in stackoverflow, here is the link: http://stackoverflow.com/questions/17649959/scroll-specific-child-into-view


      Addition: there is any relationship between contentHeight, maxVerticalScrollPosition, height?

        • 1. Re: scroll specific child into view
          Flex harUI Adobe Employee

          Even my outlook email client won't let me scroll the last line of this thread to the top.  That's because there is a relationship between contentHeight, maxVerticalScrollPosition and height.


          If you add more empty space to the content, then you would be able to scroll the last child to the top of the viewport because maxVerticalScrollPosition would reflect that larger contentHeight.

          • 2. Re: scroll specific child into view
            jasonzhuang Level 1

            thanks for your answer. So what's the relationshiip between contentHeight, maxVerticalScrollPosition and height, any equation?

            For this example, I have 6 children, each one has 200 height. The contentHeight is 1200. when the verticalScrollPosition is 0, I invoke the viewport.getVerticalScrollPositionDelta(NavigationUnit.END), the returned value

            is 900. So how the 900 is calculated?

            • 3. Re: scroll specific child into view
              Flex harUI Adobe Employee

              The equation is roughly maxVSP=contentHeight – widget.height.  There's more to it that factors in borders, padding, horizontalScrollBar, etc, but that's the basics.  If you got 900, then the control's viewport is about 300 pixels in height.