Dynamically change the size of a container to fit content
- November 3, 2021
- 2 replies
- 3202 views
I want to be able to turn scrolling off for everything except the main(parent) container. This way the page scrolls like a normal web app would. I have a parent container with many other containers within it. I can set the parent container to "scroll current container" and this works sometimes. One instance it does not work is if I have a collection widget in one of the child containers. I do not know ahead of time how many collections will be in this child container and thus I cannot make it a fixed size. The collection, therefore, scrolls even though I do not want it too. How can I turn off the scrolling for the collection and have it fit the container completely, or dynamically resize the container so I only have a single page scroll?
Another example is if I have a label widget that pulls large text bodies from a DB that can vary greatly in size. How can I make the text dynamically resize the container it is in so that no scrollbar appears? This problem seems to only exist when an inner container has static positioning, as far as I can tell, but I need this to stay static. I will attach an example of this.

