# createTextField + autoSize = infinite width/anger

**URL:** <https://forum.kirupa.com/t/createtextfield-autosize-infinite-width-anger/230377>\
**Category:** Uncategorized\
**Created:** [June 25, 2007, 8:20pm UTC](https://forum.kirupa.com/t/createtextfield-autosize-infinite-width-anger/230377 "2007-06-25T20:20:07Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![greatbigbrain](https://avatars.discourse-cdn.com/v4/letter/g/3be4f8/32.png) [@greatbigbrain](https://forum.kirupa.com/u/greatbigbrain)\
**Post date:** [June 25, 2007, 8:20pm UTC](https://forum.kirupa.com/t/createtextfield-autosize-infinite-width-anger/230377/1 "2007-06-25T20:20:07Z")

</div>

Greetings!  
Trying to accomplish the simplest thing ever… with no success.  
I want to create a textfield (all scripted) with a specified width (420) and a varying height:

```auto
txt = this.createTextField("body_txt", this.getNextHighestDepth(), 0, 0, 420, 0);
txt.multiline = true;
txt.autoSize = true;
txt.text = text from xml going here........;

```

This code changes the width.  
If I remove “autoSize”, I see no text (as the height is “0”);  
WTF?  
How do I keep the width the same as what I’ve set, and modify the height?  
Thanks in advance for what I’m sure is a simple matter…

Steve
