iOS Question ScrollView is not showing entire rows

Discussion in 'iOS Questions' started by Shay, Mar 3, 2015.

  1. Shay

    Shay Well-Known Member Licensed User

    I will try to explain without video
    if I use this code:
    scvMain.Initialize("scvMain",100%x, 100%y)
    Page1.RootPanel.AddView(scvMain, 0dip, 0dip, 100%x, 100%y)
    then it will show only the rows fit the screen it will not scroll even if I put:
    scvMain.ScrollEnabled = True

    if I change to:
    Page1.RootPanel.AddView(scvMain, 0dip, 0dip, 100%x, 90%y)
    it will scroll, but I cannot see last row (especially if I put button in the space there) - I will see part of the row, if I try to scroll up, it will automatically bounce down.

    I tried to play with:
    scvMain.Initialize("scvMain",100%x, 100%y) - changing the %y to smaller
    did not help (even worse)
     
  2. narek adonts

    narek adonts Well-Known Member Licensed User

    Change the scvMain.ContentHeight and scvMain.ContentWidth to the size which is the inner panel of the scrollview.

    Narek
     
  3. klaus

    klaus Expert Licensed User

    100%x and 100%y are only known in Page1_Resize.
    Where and how do you define the height of Scrollview internal Panel ?
    I don't see scvMain.Panel.ContentHeight = xxx
    The ScrollView will scroll only if scvMain.Panel.ContentHeight > scvMain.Height.
    The same is valid for the width.
    The B4i ScrollView can scroll in both directions like ScrollView2D in B4A.
     
  4. narek adonts

    narek adonts Well-Known Member Licensed User

    for exemple

    Code:
    Dim ScvMain As ScrollView
        ScvMain.Initialize(
    "ScvMain",200%x,200%y)
        ScvMain.ContentHeight=
    200%y
        ScvMain.ContentWidth=
    200%x
    Change the 200%x with your size
    you can change it on runtime also

    ScvMain.Panel.Height=x
    ScvMain.ContentHeight=x
    ...

    Narek
     
  5. Erel

    Erel Administrator Staff Member Licensed User

    Please do not make duplicate posts. See my answer in the other thread.
     
  6. Shay

    Shay Well-Known Member Licensed User

    Actually it is not duplicate,
    it was solved by moving to designer as you suggested on other thread
    AND
    changing bounce to false
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice