Yes, all renderers need to define a setValue method, where you have the data for that cell.  In there, you can perform your logic for “if this val, use this color, else use etc etc”.

 

Its as simple as:

<mx:Label>

  <mx:Script>

      Function setValue(I forgot the parameters){

        //logic

     }

  </mx:Script>

</mx:Label

 


From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of Alex Uhlmann
Sent: Wednesday, February 15, 2006 8:35 AM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Datagrid text colors (v1.5)

 


Hi Tom,

You could create a cellRenderer of a DataGridColumn, place i.e. a Label
component in there and set it's style i.e. via:
yourLabelID.setStyle("color", 0xff0000);

Best,
Alex

Alex Uhlmann
Technical Consultant (Rich Internet Applications)
Adobe Consulting
Westpoint, 4 Redheughs Rigg, South Gyle, Edinburgh, EH12 9DQ, UK
p: +44 (0) 131 338 6969
m: +44 (0) 7917 428 951
[EMAIL PROTECTED]


-----Original Message-----
From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On
Behalf Of Tom Fitzpatrick
Sent: 15 February 2006 12:01
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Datagrid text colors (v1.5)

In a datagrid, I want to display the text in a cell using two different
colors - in the style of syntax formatting.

Is there any way to do this in version 1.5 (or 2)?

- Tom






--
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




SPONSORED LINKS
Web site design development Computer software development Software design and development
Macromedia flex Software development best practice


YAHOO! GROUPS LINKS




Reply via email to