Hi Simon,
I have been struggling with exactly the same issue. I've been making a screen which shows a full message thread. Imagine a "main message", which will always be shown at the top, and then a gallery of responses - the remaining thread underneath. The main message is placed in the first datacard on a scrollable screen. This datacard's height is set to height of the flexible HtmlText within it + padding.
The remainder of the thread is then shown in a flexible gallery in the second datacard. All gallery items contain an HtmlText with auto height = true. The intuitive thing to do is to then set the gallery height to Sum(Gallery.AllItems, HtmlText.Height) - however, that is not possible. What I did to make it work was this:
Add a slider to the gallery. Set its max to something ridiculous, so that it is never capped. Mine is set to 2500.
The slider's default value should be set to the height of whatever text field you're using (HtmlText, multiline label etc.) + your desired padding. Or, as in my case, I set the default value of the slider to my bottom divider's y position + padding, as it is already positioned dynamically under my text field.
Now you can sum up the total value of your sliders in your Gallery's height property. Sum(Gallery.AllItems, Slider.Value). If your padding is not enough, just add a bit more in the slider's default property, or simply add it in the final sum. Once you know that it is working, just set the slider's visible property to false.
Of course you also want to set the scrollable screen datacard which holds your gallery to the height of your gallery + padding. I say padding because I always add a little to the total height. Without any padding, especially in the gallery height, you may be forced to scroll a tiny bit. I add the padding either in the slider's default value, e.g. HtmlText.Height + 50, or in the Gallery's height property, e.g. Sum(Gallery.AllItems, Slider.Value + 50), where 50 is the padding. As the gallery is refering to itself, you could also use Sum(Self.AllItems, Slider.Value + 50). Adjust the padding to the point where the height is just enough to not need scrolling.
It's dumb that you have to work so hard to hack your way to such basic functionality. But this is relatively fast and easy to do, and it works. Good luck 🙂