iOS Question Scrollview not scrolling

Nickelgrass

Active Member
Licensed User
Longtime User
Hello,
I have a lot of problems with a layout. I simply have a scrollview in a layout. Now I have a layout that is higher than the screen. I load this layout into the panel of the scrollview. But I cannot scroll it.
Code:
settings_scrollview.Panel.LoadLayout("lay_settings_panel")
settings_scrollview.ContentHeight = lastview.top + lastview.height
settings_scrollview.Panel.Height = lastview.top + lastview.height
settings_scrollview.ContentWidth = settings_scrollview.Width

What do I have to do to make it scroll?

Edit: this bloody thing does not work at all. If I pull the scrollview it does not scroll but slides up and down and shows a second ghost layout in the background with the same content. What is going on with this?
 
Last edited:

Nickelgrass

Active Member
Licensed User
Longtime User
What is the height of "lay_settings_panel" ?
Where is lastview.Top defined ?
I dont know what height lay_settnigs_panel has. It is just a layout with some views. The lastview.top is 750 in the designer but only 714 if I log the top in the app.

If I simply change the contentheight to something rediculous like 5000 I can scroll. Also I have some pcikers in this layout and it is almost impossible to change the settings without scrolling.
 
Upvote 0

klaus

Expert
Licensed User
Longtime User
If you cannot scroll, this means that the internal Panel of the ScrollView has not the correct value.
Can you post a small project showing the problem ?
I see that you are using settings_scrollview.ContentHeight and settings_scrollview.Panel.Height.
ContentHeight is B4i and Panel.Height is B4A.
Is your project a multi-platform project ?
 
Upvote 0
Top