iOSScrollableArea and orientation change

@Ulrich Bogun your example is a good starting point, but it miss one element.
there is no relation between content size and the size of what you see.

One wonderful setup in Xojo is that when it create the content for the scrollable view it calculates the needed dimensions and so the contentSize dimensions.
If you need to let the containerControl follow the screen size (ok one of the screen size otherwise it would have no sense) you have to change the scroll contentSize and the scroll control (the containerControl) dimensions. How? Using a named iosLayout.

https://www.dropbox.com/s/6ozgxm7tll1aed8/ScrollContentResize2.xojo_binary_project?dl=0
Here is an update version of your example. There is a line control (you can use any thing I used the line just to make the things clear)
You control now search in the container constrains named “ww” and “hh”, then on the basis of this search, modify the container and the contentSize.

As I said before, contentSize and container are 2 different things, is up to you keep them coordinated if you need to do so.

Xojo, lacks this contentSize method/function but it is a lot simpler than other environments for operations like this one.

Thanks to all of you :slight_smile:
Here’s a good technical answer to the initial question.

A possible workaround would be to have two views : one for portrait, one for landscape.

Thanks a lot, Antonio! I am too used to iOSLib/AppleLib where I have the convenient AutoResizingMask and TranslatesAutoResizingMaskToConstraints (phew, those Apple names!).
I thought a container control would clip to the contentsize (it can with ARM set accordingly), but it does not with pure Xojo. Great workaround and a pleasure to coordinate things with you again.

Glad the forum could help. From my experience, there’s almost no show-stopper in Xojo iOS anymore. Some might need a bit of work, but that wouldn’t be much different in other IDEs. And it will get better in Xojo soon. Feel free to ask again if you should feel stopped.