# Button with dynamic label inside

**URL:** https://forum.kirupa.com/t/button-with-dynamic-label-inside/284884
**Category:** Uncategorized
**Created:** [March 24, 2009, 6:05pm UTC](https://forum.kirupa.com/t/button-with-dynamic-label-inside/284884 "2009-03-24T18:05:23Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Some\_Guy](https://avatars.discourse-cdn.com/v4/letter/s/439d5e/32.png) [@Some\_Guy](https://forum.kirupa.com/u/Some_Guy)
#### Post date: [March 24, 2009, 6:05pm UTC](https://forum.kirupa.com/t/button-with-dynamic-label-inside/284884/1 "2009-03-24T18:05:23Z")

</div>

Hi all,  
I’m trying to do a button with a dynamic textfield inside, and I want the button to resize according to the size of the textfield.  
I could create a textfield with _createTextField_, but the problem is that in that case I’d need to give it the size of the text, that I don’t know beforehand.  
How could I know that? Did anyone have the same problem?
