Hi I am struggling with an idea, how to automatically expand container horizontally depending on how many elements are in it. My scenario:
- I have one main container that will be scrollable
- Within the main container, I have Sub containers (sections)
- Each Sub container contains different elements stacked on top of each other vertically.
Requirements:
I want to auto adjust sub containers depending on how many buttons there are on top of each other for ex. My idea was, that I would do "ForAll" function on all child elements of "Sub1", there I would get reference to every button, get its height, and add everything together. so if one button has height of 30px, multiply it by 4, that is 120px and that would the be the height of the container. The moment, one button is hidden dynamically, height of the container would be 30x3 = 90px
Problem is, I have no idea, how to get child elements of a parent. I wanted to do something like:
Screen4.Main.Sub1.Items
I cannot use other lists/collections where I would be storing elements of each section, because that will be a nightmare to handle. I will be storing different sections with different heights. 😞 Please, do you have any other idea, how to get list of children elements dynamically?
