# Dynamic text field size

**URL:** <https://forum.kirupa.com/t/dynamic-text-field-size/13655>\
**Category:** flash\
**Created:** [February 16, 2003, 10:38am UTC](https://forum.kirupa.com/t/dynamic-text-field-size/13655 "2003-02-16T10:38:08Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![adham\_a](https://avatars.discourse-cdn.com/v4/letter/a/91b2a8/32.png) [@adham\_a](https://forum.kirupa.com/u/adham_a)\
**Post date:** [February 16, 2003, 10:38am UTC](https://forum.kirupa.com/t/dynamic-text-field-size/13655/1 "2003-02-16T10:38:08Z")

</div>

Hello all,

how can i make the size of a dynamic text field exactly equall to the text inside it with out any margins on its borders.

Thank you.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [February 16, 2003, 5:51pm UTC](https://forum.kirupa.com/t/dynamic-text-field-size/13655/2 "2003-02-16T17:51:06Z")

</div>

Create your textbox and give it the INSTANCE name (this is important that you don’t set it as the var name) of “myTextBox” (just for this example, you can change it for your real textbox).

Add this code to a frame on the timeline…

```php
myTextBox.autoSize = true;

```
