# How to make the textfield always fix to the length of the text the user input?

**URL:** <https://forum.kirupa.com/t/how-to-make-the-textfield-always-fix-to-the-length-of-the-text-the-user-input/92761>\
**Category:** Uncategorized\
**Created:** [October 21, 2003, 12:11pm UTC](https://forum.kirupa.com/t/how-to-make-the-textfield-always-fix-to-the-length-of-the-text-the-user-input/92761 "2003-10-21T12:11:29Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![SBUH](https://avatars.discourse-cdn.com/v4/letter/s/4bbf92/32.png) [@SBUH](https://forum.kirupa.com/u/SBUH)\
**Post date:** [October 21, 2003, 12:11pm UTC](https://forum.kirupa.com/t/how-to-make-the-textfield-always-fix-to-the-length-of-the-text-the-user-input/92761/1 "2003-10-21T12:11:29Z")

</div>

Hello, I have a dynamic textfield which receive the text the user input. And I want to make it like no matter how many words the user type, it always have the same area of the box,

## say if the user type hello, the texfield box is

- 

```
        -

```

- 

```
        -

```

* * *

## this large and if the user type hello, the world, the textfield change to

- 

```
                      -

```

* * *

the font seems smaller than the former one, but the total area remains the same. How should I make the coding so that it can have this kind of effect.  
Thanks very much in advance!
