# Help with resizing textArea component : Text getting streched

**URL:** https://forum.kirupa.com/t/help-with-resizing-textarea-component-text-getting-streched/115166
**Category:** Uncategorized
**Created:** [July 6, 2004, 4:35am UTC](https://forum.kirupa.com/t/help-with-resizing-textarea-component-text-getting-streched/115166 "2004-07-06T04:35:56Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![adityagaddam](https://avatars.discourse-cdn.com/v4/letter/a/7c8e57/32.png) [@adityagaddam](https://forum.kirupa.com/u/adityagaddam)
#### Post date: [July 6, 2004, 4:35am UTC](https://forum.kirupa.com/t/help-with-resizing-textarea-component-text-getting-streched/115166/1 "2004-07-06T04:35:56Z")

</div>

Hey guys,

I am currently working on a client’s website. I need some help though.

Problem:  
I have a textarea component. This textarea will have text loaded dynamically, so bascially I dont know what the maxVPosition is until runtime. I tried to resize the textarea so that the text doesn’t have to scroll, but this makes the font strech too… making it rather large. I have tried the following to counter this…

```auto

this._height += this.maxVPosition * (Number(font_size) + 10);
this.vScrollPolicy = "off";
font_size2 = font_size * (init_height/this._height);
this.setStyle("fontSize",Math.round(font_size2));

```

this however does not work as the font still stays huge.

Any ideas are appreciated.

Thanks  
Aditya

---

<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: [July 7, 2004, 5:51am UTC](https://forum.kirupa.com/t/help-with-resizing-textarea-component-text-getting-streched/115166/2 "2004-07-07T05:51:04Z")

</div>

Excellent, no problem. Glad to be of help.

---

<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: [July 7, 2004, 4:48pm UTC](https://forum.kirupa.com/t/help-with-resizing-textarea-component-text-getting-streched/115166/3 "2004-07-07T16:48:01Z")

</div>

could also try to use the textfield.autoSize feature… 😉  
works fine
