On 4/13/05, Tom Fitzpatrick <[EMAIL PROTECTED]> wrote: > I'm building strings for display in a textArea. Is there a way to > programmatically add color to selected portions of text?
Yup. <?xml version="1.0"?> <mx:Application xmlns:mx="http://www.macromedia.com/2003/mxml" xmlns="*" creationComplete=""> <mx:Text id="t" text="The quick brown fox jumped over the text." /> <mx:Button label="Color" click="doColor()"/> <mx:Script> function doColor():Void { var tf = t.labelField.getTextFormat(5, 10); tf.color = 0xFF0000; t.labelField.setTextFormat(5, 10, tf); } </mx:Script> </mx:Application> labelField is an undocumented property. It's of type TextField. -- [EMAIL PROTECTED] http://manish.revise.org/ Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/

