1. Is it possible to auto resize a SimpleHTML Object whenever the text changes?

    For example, if I do

    SimpleHTML:SetText("<html><body><p>Hello</p></body</html>") it sets the text fine, but if I do SimpleHTML:SetText("<html><body><p>Hello<br/>Hello</p></body</html>") and add enough line breaks, the text will render outside of my backdrop.

    Can frames auto resize themselves depending on what you add to them?

    I am writing a mod that shows me how much damage each of my attacks does (sort of like recount but only for myself and it records the damage of each attack.)

    The gist of my algorithm is:

    1) Record the attack and damage it does 2) Render the attack and damage with SimpleHTML: e.g;

    SimpleHTML:SetText('<html><body><p>Autoattack: 3000<br\>Mangle: 10000</body></html>');

    My SimpleHTML was initially set with a fixed size (SetWidth/SetHeight) and I have a backdrop set, but the backdrop size never changes (assuming the frame does not change, but the text is rendered outside of it)

    I tried using a plan black background texture and the same thing happened, the size was fixed, but the text was outside of it.

    Or perhaps there is a better approach?


    The standard way of doing this is putting the SimpleHTML frame as a ScrollChild of a ScrollFrame. That's the only frame in WoW that really does any clipping, which is what you're trying to do.