# TextArea troubles

**URL:** <https://forum.kirupa.com/t/textarea-troubles/247300>\
**Category:** flash\
**Created:** [December 20, 2007, 11:03pm UTC](https://forum.kirupa.com/t/textarea-troubles/247300 "2007-12-20T23:03:42Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![fried](https://avatars.discourse-cdn.com/v4/letter/f/3d9bf3/32.png) [@fried](https://forum.kirupa.com/u/fried)\
**Post date:** [December 20, 2007, 11:03pm UTC](https://forum.kirupa.com/t/textarea-troubles/247300/1 "2007-12-20T23:03:42Z")

</div>

Hi there,

how come when trying to see the text Formatting of a text area the following code, when tracing \_curFormat traces _[object TextFormat]_. What does this mean?

I need to find out if the selected text is bold or not. This will allow the user to set it bold or set it non bold.

```auto
		
private function bold():void
{
	_selStart = myArea.selectionBeginIndex;
	_selEnd = myArea.selectionEndIndex;
			
	var _textBold:TextFormat = new TextFormat();
	var _curFor:TextFormat = new TextFormat();
			
	_textBold.bold = true;			
	_curFor = myArea.textField.getTextFormat(_selStart, _selEnd);
			
	myArea.textField.setTextFormat(_textBold, _selStart, _selEnd);
			
	trace(_curFor);
			
}

```

thanks.
