# RichTextEditor.textArea == null

**URL:** <https://forum.kirupa.com/t/richtexteditor-textarea-null/272458>\
**Category:** flash\
**Created:** [October 5, 2008, 4:17pm UTC](https://forum.kirupa.com/t/richtexteditor-textarea-null/272458 "2008-10-05T16:17:43Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![grozavpaul](https://avatars.discourse-cdn.com/v4/letter/g/ec9cab/32.png) [@grozavpaul](https://forum.kirupa.com/u/grozavpaul)\
**Post date:** [October 5, 2008, 4:17pm UTC](https://forum.kirupa.com/t/richtexteditor-textarea-null/272458/1 "2008-10-05T16:17:43Z")

</div>

I want to change a property of the TextArea from my RichTextEditor. So i tried to do this:

```auto

textEditor.textArea.setStyle("backgroundColor", 0xff0000);

```

but i got an error message at run time. I am using Flash Player 10 and i got this error:

```auto
TypeError: Error #1009: Cannot access a property or method of a null object reference.
    at webSiteBuilder/private:main/paginaObjectTextDoubleClickHandler()[D:\lucru\Flex\webSiteBuilder\websiteBuilder\src\include\panouStanga\element.as:27]

```

“Cannot access a property or method of a null object” ??? ok so i said then:

```auto

mx.controls.Alert.show(String(textEditor.textArea));

```

And, yes, it said : “null” … why is this? in the Flex Help at the RichTextEditor’s class we have this:  
_**To access one of the subcontrols, you can use syntax similar to the following: \*\*\*  
\*\*\* myRTE.toolBar2.setStyle(“backgroundColor”, 0xCC6633);**_  
So…what am i doing wrong?

By the way: i found this link: [http://blog.flexexamples.com/2008/08/25/setting-the-background-color-of-the-richtexteditor-text-area-in-flex/](http://blog.flexexamples.com/2008/08/25/setting-the-background-color-of-the-richtexteditor-text-area-in-flex/)

Still why doesn’t it work for me?
