Auto adjust text

I am trying to find a way for to allow me to automatically adjust the font size of a text filed when the text gets too large for the text field box.

I have tried to set the text field to autosize and keep track of the text box, I then watch the textWidth property. When the textWidth property gets too big, I decrease the font size. I figured the text field box would decrease thus decreasing the textWidth property, but the textWidth property increases with each new character entered.

I hope that this is clear enough.

I am a newby, so if this looks like a no brainer, please have pitty on me.