# Dynamic Text Box - Width dependent on text

**URL:** https://forum.kirupa.com/t/dynamic-text-box-width-dependent-on-text/210769
**Category:** flash
**Created:** [December 21, 2006, 10:35pm UTC](https://forum.kirupa.com/t/dynamic-text-box-width-dependent-on-text/210769 "2006-12-21T22:35:01Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Nineteen](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/nineteen/32/2679_2.png) [@Nineteen](https://forum.kirupa.com/u/Nineteen)
#### Post date: [December 21, 2006, 10:35pm UTC](https://forum.kirupa.com/t/dynamic-text-box-width-dependent-on-text/210769/1 "2006-12-21T22:35:01Z")

</div>

Hey’a if I have a dynamic textbox named ‘myText’ and have this kind of code…

```auto

myText.text = "I want to stretch the text box dependent on the text";

```

At the moment all I can see is ‘I’ - I want the textbox to stretch based on how much text is in it, and not to go to a new line - So the one line just keeps gettin bigger.

Whats the code please :D?
