Another THTMLText Bug Autosize

Hello,

Autosize does not work properly, it seems that not only the displayed text but the text including the HTML-Tags is used for the calculation.

Best regards,

Arnd

Limitation in FireMonkey, due to lack of virtual methods, we cannot override this. We can only hope the next version of FireMonkey will have improvements in this area.

Do you have a workaround? I would be fine if I could get function to calculate the size.

I use HTMLText very often in my project to render text on photos.

Thank you very much, I am very happy with your firemonkey components!

Arnd

With the component as-is, I see no straightforward workaround, all workaround will require some extra code. We'll investigate whether we can add a built-in workaround for this issue in a future update.

Any workaround would be fine, an extra call like to a method that calculates the dimensions of my HTML-Text would be no problem for me. 

You can try using this function:


Switch off WordWrapping:
TMSFMXHTMLText1.WordWrap := False;
TMSFMXHTMLText1.Width := TMSFMXHTMLText1.GetTextWidth;

This is no garantuee that this calculation will work in all cases. It needs further investigation to support all possible combinations of autosizing / wordwrapping and html tags.

Kind Regards, 
Scheldeman Pieter