# setNewTextFormat() - how?

**URL:** <https://forum.kirupa.com/t/setnewtextformat-how/154772>\
**Category:** flash\
**Created:** [July 12, 2005, 5:08pm UTC](https://forum.kirupa.com/t/setnewtextformat-how/154772 "2005-07-12T17:08:43Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jankratochvil](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/jankratochvil/32/566_2.png) [@jankratochvil](https://forum.kirupa.com/u/jankratochvil)\
**Post date:** [July 12, 2005, 5:08pm UTC](https://forum.kirupa.com/t/setnewtextformat-how/154772/1 "2005-07-12T17:08:43Z")

</div>

I would like to apply the text format style for this text field also:  
But this code no works for those textfields.

```auto
email_txt.text = "@";
email_txt.setNewTextFormat(myTextFormat)
subject_txt.text = "Subject text";
subject_txt.setNewTextFormat(myTextFormat)
body_txt.text = "";
body_txt.setNewTextFormat(myTextFormat)

```

I have this style defined:

```auto
//START style format
myTextFormat = new TextFormat ();
myTextFormat.size = 10;
myTextFormat.bold = false;
myTextFormat.font = "Courier"
myTextFormat.color = "0x000000";
//END style format

```

Please look the attached file.
