# Creating textfield that automatically grows in height onScroll

**URL:** <https://forum.kirupa.com/t/creating-textfield-that-automatically-grows-in-height-onscroll/178961>\
**Category:** Uncategorized\
**Created:** [February 15, 2006, 6:51pm UTC](https://forum.kirupa.com/t/creating-textfield-that-automatically-grows-in-height-onscroll/178961 "2006-02-15T18:51:06Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![voxecho](https://avatars.discourse-cdn.com/v4/letter/v/278dde/32.png) [@voxecho](https://forum.kirupa.com/u/voxecho)\
**Post date:** [February 15, 2006, 6:51pm UTC](https://forum.kirupa.com/t/creating-textfield-that-automatically-grows-in-height-onscroll/178961/1 "2006-02-15T18:51:06Z")

</div>

Hey, i am having problems making my textfield automatically grow in height when the text is taller then the area.

here is what i am doing

```auto

     /*
      * push the text so that the first line is visible
      ***** /
     txt.scroll = 1; 
     /*
      * loop as long as the maxscroll is > 1
      ***** /
     while(txt.maxscroll>1){
     /*
      * increase the size of the textfield height by 1
      ***** /
      txt._height++;
     } // loop

```

all that happens is i go into an infinite loop. When i put in a panic counter (kills loop at 1000) and trace out each incrament, i see that the maxscroll stays at 2… Any ideas what i might be doing wrong?

Echo
