# TextArea autoSize/ autowrap not working

**URL:** https://forum.kirupa.com/t/textarea-autosize-autowrap-not-working/319156
**Category:** flash
**Created:** [February 10, 2011, 12:00pm UTC](https://forum.kirupa.com/t/textarea-autosize-autowrap-not-working/319156 "2011-02-10T12:00:49Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![nitinmukesh](https://avatars.discourse-cdn.com/v4/letter/n/7feea3/32.png) [@nitinmukesh](https://forum.kirupa.com/u/nitinmukesh)
#### Post date: [February 10, 2011, 12:00pm UTC](https://forum.kirupa.com/t/textarea-autosize-autowrap-not-working/319156/1 "2011-02-10T12:00:49Z")

</div>

Hi,

I did a search and found few solutions to this problem however it is not working in my case.

I am facing problem related to TextArea auto wrap.

I used the following code I found on net to fix this however it is not working. ☹

```php
addEventListener(FlexEvent.CREATION_COMPLETE,onCreationComplete);

protected function onCreationComplete(event:FlexEvent):void
        {
            //textAreaControl is the id of the control you want to resize to contain it's text.
            updateSize();    
        }
        protected function updateSize():void
        {
            if(mx_internal::getTextField() != null)
            {
                validateNow();
                mx_internal::getTextField().autoSize = TextFieldAutoSize.LEFT;
                height = mx_internal::getTextField().height + 1;
            }
        }

```

see the attached screenshot. the border is drawn incorrectly around textarea

Any help is appreciated.
