Scrollview Problem

thewavemaster

Member
Licensed User
Longtime User
Hello!

I want to use a scrollview panel and load one layout file in it. I jut want that the user can scroll if he is using a small device.

But I don't know, how this works to lad a simple layout file in a scrolling panel...? :BangHead:

I always get this warning in the log:
Warning: Panel.LoadLayout called with zero sized panel.

can you use (probably 3 or 4 simple lines) how I can add a layout file to a scrollin view?
 

thewavemaster

Member
Licensed User
Longtime User
Thank you!

Is there something special I have to do?
Everything is displayed now, but scrolling seems to be not enabled since it doens't work
 
Upvote 0

Eduard

Active Member
Licensed User
Longtime User
Thank you!

Is there something special I have to do?
Everything is displayed now, but scrolling seems to be not enabled since it doens't work

What is the height of the scrollview? Scrolling only works if this is less than the heigt of the scrollview panel

is scrollview1.height < scrollview1.panel.height
 
Upvote 0

klaus

Expert
Licensed User
Longtime User
How do you 'populate' the internal Panel of the ScrollView ?
If you do it like in the example I suggested you you have several heights:
- The ScrollView.Height, that up to you to define it it's the visible part on the screen.
- The Panel you defined in the designer, its height can be higher than the ScrollView height and even higher than the screen.
- You must load this layout file to the ScrollView.Panel with ScrollView1.Panel.LoadLayout("xxx")
- You must set the height of the internal panel of the scrollview to the height of the panel you defined in the designer ScrollView1.Panel.Height = Panel1.Height.
If the height of the internal panel of the scrollview is less than the height of the scrollview itself there is of course no scrolling.

Otherwise post your project as a zip file (IDE menu Files / Export As Zip) so I could have a look at it.

Best regards.
 
Upvote 0
Top