# Dynamically adjusting text box to fit text

**URL:** https://forum.kirupa.com/t/dynamically-adjusting-text-box-to-fit-text/295780
**Category:** flash
**Created:** [September 4, 2009, 3:23am UTC](https://forum.kirupa.com/t/dynamically-adjusting-text-box-to-fit-text/295780 "2009-09-04T03:23:02Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Shaedo](https://avatars.discourse-cdn.com/v4/letter/s/e19b73/32.png) [@Shaedo](https://forum.kirupa.com/u/Shaedo)
#### Post date: [September 4, 2009, 3:23am UTC](https://forum.kirupa.com/t/dynamically-adjusting-text-box-to-fit-text/295780/1 "2009-09-04T03:23:02Z")

</div>

Hi was wondering if anyone knows a good strategy to adjust a text box to fit text.  
any ideas welcome.

Currently I am thinking to:

1. counting the length of text,
2. chopping it into lines (add  
)
3. counting the lines and
4. stretch the text box to fit.

But I am hoping there is a better way!

I want to then move a button to fit at the bottom of my text box.

any ideas welcome.  
Thankyou!
