Hi 

Let me clear what is MyTextArea. This component is copied from
<mx:RichTextEditor/>, so that user can format each character of
MyTextArea's text. 

For a testing purpose I have create one more component TempTextArea
based on TextArea, and put it inside Card component. And when user
change font I am updating fontFamily of TempTextArea using following
setter method
public function set _font(val:String):void{
     this.setStyle("fontFamily",val);
}

And TempTextArea is working correct.

I think there is something wrong in MyTextArea, as it uses all method
of RichTextEditor.mxml and have following function to update styles of
TextArea

public function setTextStyles(type:String, value:Object = null):void
{
     //I have removed lines which are not related to my issue
     var tf:TextFormat;
     var beginIndex:int = this.getTextField().selectionBeginIndex;
     var endIndex:int = this.getTextField().selectionEndIndex;
     .........
     tf[type] = value;
     ..........
     this.getTextField().setTextFormat(tf,beginIndex,endIndex);
}

Reply via email to