Determine required height for HTML Text component?


I have some HTML text I want to display in a TTMSFMXHTMLText component.
I don't know how much space it'll require, and so want to put it in a TVertScrollBox component.
I can't figure out a way to tell the component to grow as tall as necessary to display it's contents.
Is there a way I can ask it how tall it would need to be to display the contents?
Is there a better way to get this job done?

Thank you, Alex


The TTMSFMXHTMLText component has an AutoSize property.
Perhaps you can set the width of the component to the width of the scrollbox, before setting Autosize to true? It should automatically resize to the correct height and show a vertical scrollbar in the scrollbox if necessary.

If the above solution doesn't work as expected, you can manually retrieve the width and height of the text respectively with GetTextWidth and GetTextHeight.

Kind Regards, 

For anyone reading this... the AutoSize method did not work, but the GetTextWidth did.

Thank you.

I have another question about determining component size, but this is about figuring out the vertical space required by a TFlowLayout to display it's contents when the width is constrained. I'll ask it in a new post.