iOS Question scrollview does not work

Ramezanpour

Active Member
Licensed User
Hi
Excuse me.
scrollview does not work


B4X:
    ScrollView1.ContentWidth= ScrollView1.Width
    ScrollView1.ContentHeight=ScrollView1.Height
    ScrollView1.Panel.LoadLayout("L8")
I can't Scroll
Scrolling does not work
 

omidaghakhani1368

Well-Known Member
Licensed User
Hi.
Please attention!!!
You have seted inner panel height equal to scrollview height
So you scrollview dont have scroll.
Please change ScrollView1.ContentHeight=ScrollView1.Height to ScrollView1.ContentHeight= 800 for exmaple and retest it
 

klaus

Expert
Licensed User
You need to post more code.
What do you have in 'L8' layout ?
Or post a small example, as a zip file, showing your problem.
 

davepamn

Active Member
Licensed User
B4X:
Private Sub Page1_Resize(Width As Int, Height As Int)

    If ScrollViewInput.IsInitialized=True Then

        ScrollViewInput.Height=100%y

        ScrollViewInput.ContentHeight=1900%y

        ScrollViewInput.ContentWidth=100%x

        ScrollViewInput.Width=100%x

    EndIf
 


End Sub
You have to resize the scrollview when the page resizes.
 

Ramezanpour

Active Member
Licensed User
B4X:
Private Sub Page1_Resize(Width As Int, Height As Int)

    If ScrollViewInput.IsInitialized=True Then

        ScrollViewInput.Height=100%y

        ScrollViewInput.ContentHeight=1900%y

        ScrollViewInput.ContentWidth=100%x

        ScrollViewInput.Width=100%x

    EndIf



End Sub
You have to resize the scrollview when the page resizes.
work !
but all things are strong
 

Brian Robinson

Active Member
Licensed User
Maybe your controls have been doing weights? Sorry couldn't help it ;)

But seriously, you need to try and explain what you are talking about. I know this can be hard if you are from a non-english speaking background, but look at it from our point of view. How exactly do we interpret "strong"?

I think it is always so much easier if you can replicate the same problem in a small project, and upload it.

Cheers
Brian
 
Top