Better off to use a cellRenderer G. Here's some code to get you started. <?xml version="1.0" encoding="utf-8"?> <mx:Label xmlns:mx="http://www.macromedia.com/2003/mxml" mouseOver="doMouseOver()" mouseOut="doMouseOut()"> <mx:Script> <![CDATA[ private var lastStyle:Object; private var state:String; private function doMouseOver() { //d("----------------"); //d("FolderCellRenderer::doMouseOver"); if(state != "selected") { lastStyle = this.getStyle("color"); this.setStyle("color", "0x648BCB"); } this.setStyle("textDecoration", "underline"); } public function d(o) { mx.core.Application.application.d(o); } public function dProps(o) { mx.core.Application.application.dProps(o); } private function doMouseOut() { //d("----------------"); //d("FolderCellRenderer::doMouseOut"); this.setStyle("textDecoration", "none"); this.setStyle("color", lastStyle); } public function setValue(str:String, item:Object, sel:String) { // selected, highlighted, normal state = sel; if (item == undefined) { visible = false; return; } visible = true; text = str; }
]]> </mx:Script> </mx:Label> ----- Original Message ----- From: "Stacy Young" <[EMAIL PROTECTED]> To: <[email protected]> Sent: Friday, January 20, 2006 2:43 AM Subject: [flexcoders] Possible to use labelFunction and change text color? It's the wee hours of the morning and my brain is fried. Is it possible to set the text color for the label of an individual node in a tree? Thanks! Stace -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 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/

