This is my hierarchy in the Unity scene:
I set the graphics to work perfectly in portrait mode with mobile device screens. But when I use the graphics on a tablet, or when I rotate the device, I have to enlarge the elements, and here the problem arises.
I can't find the correct way to expand the elements, I want many ScrollViews in the Vertical Layout Group, and I want to be able to scroll horizontally to view the texts inside, that's what I'm asking.
The question is convoluted and complex to explain, I explain it in three different ways (talking about the same thing, so they may seem similar), you choose which one is more understandable to you:
Explanation 1
The Vertical Layout Group expands autonomously, covering a large part of the screen.
The problem arises when I have to decide how to enlarge the ScrollView, I cannot use the anchors because they are replaced by the Vertical Layout Group, and I cannot use the "Control Child Size" and "Child Force Expand" option, because it would expand beyond the Vertical Layout Group, if the text component inside was longer, thus making the Scroll useless.
I want the ScrollView to expand only within the limits of the Vertical Layout Group, and therefore not be affected by the length of the internal text component (so that I can scroll it) (PS. I cannot use a Layout Element, because the text can vary both horizontally and vertically, and because the ScrollView is equipped with another Vertical Layout Group (I need it to manage the vertical development of the text, if it want to expand in height))
Explanation 2
I would like the ScrollView to expand horizontally until it touches the limits of the Vertical Layout Group. This I would be able to do by enabling "Control Child Size" and "Child Force Expand".
However, I would like one more thing, which is that the ScrollView does not expand beyond the limits of the Vertical Layout Group. This problem is caused when the Text component (of variable size) will be longer than the length of the Vertical Layout Group.
I would therefore like the ScrollView to expand into the Vertical Layout Group, without being influenced by the size of the child.
Explanation 3
Trying to seem clearer, to enlarge the ScrollView to the limits of the VLG, I have to enable both "Control Child Size" and "Child Force Expand" (I can't use anchors, because it's the same VLG that replaces them with its own), but putting "Control Child Size", if the child Text were to be longer than the VLG, it would make the ScrollView enlarge (and I don't want this to happen! otherwise the ScrollView, if it were as long as its component, would make no sense! I want that the ScrollView stretch to the limits of the VLG, but don't exceed them!)
Enabling "Control Child Size" and "Child Force Expand" in the VLG made the ScrollView dependent on the length of the child. However, by also enabling "Control Child Size" in an additional VLG in the ScrollView, the problem vanished. In practice, the ScrollView stops depending on the child, so it is it who controls, instead of being controlled.