Autosize TextArea after text

How do I set a TextArea component to autosize itself vertically depending on the size of the textfile it loads?

I was thinking that the following code would do, but nosirebob:

cmp_TextArea.setSize(200, “auto”);