Please, try your solution - it doesn’t work for me, but the wp solution just works correctly:
1) akLeft, akRight, wordwrap = true, autosize = false - word wrap is done based on the width set by the user, but the height is not adjusted
2) akLeft, akRight, wordwrap = true, autosize = true - word wrap is done based on the width set by the user and the height is adjusted to fit the entire text
3) akLeft, akRight, wordwrap = false, autosize = true - the text is in one line and the width is adjusted
4) akLeft only, wordwrap = true, autosize = true - the text is in one line and the width is adjusted
and that’s all in the solution from wp.
but if I write “if autosize then adjustsize;” instead of the commented line, then the above rule 2 ("2" above) do not work and rule 4 works the same as in the solution from wp.