can someone tell me how I can manage to give single words inside a DataGrid-CellRenderer a different color than defined by the TextFormat for that CellRenderer? It's not how to get these single words, it's how to use more than one color inside one cell...
I've received the solution in the Flashcoders mailing list yesterday and it really hist the spot:
I adapted the example on the following page to show you a quick test:
I changed the drawLayout function to highlight the word "renderer" in red. You need to import TextFormat and TextField classes too.
override protected function drawLayout():void { textField.width = this.width; var text:String = textField.text; var tf:TextFormat = textField.getTextFormat(); var redIdx:int = text.indexOf("renderer"); if (-1 != redIdx) { tf.color = 0xff0000; } TextField(textField).setTextFormat(tf, redIdx, (redIdx + 8)); super.drawLayout(); }