where does this array of colors live, eh?  Sounds to me it would be a fixed
array that could live in the renderer.  Then just over ride the data setter
in your renderer setting the background color there via setStyle().

Petter Ent at 
http://weblogs.macromedia.com/pent/archives/2007/02/index.cfm<http://weblogs.macromedia.com/pent/archives/2007/02/index.cfm>
has a example that's a little different.  Someone from Adobe mentioned on
flexcoders extending Label in this way is a bit lighter too, so should
perform better.


DK

On 7/9/07, Ian Skinner < [EMAIL PROTECTED]> wrote:
>
> I have a custom item render setup for a datagrid cell.  What I would
> like to happen is that the background color of the render to be based on
> a value from an array determined by the data.severity integer.  How
> might one do this?
>
> TIA
> Ian
>
> <mx:DataGridColumn dataField="severity" headerText="Severity"
> itemRenderer="Components.Renderers.severity"/>
>
> Component.Renderers.severity.mxml
> ---------------------------------
> <?xml version="1.0" encoding="utf-8"?>
> <mx:VBox xmlns:mx=" http://www.adobe.com/2006/mxml";
>         textAlign="center"
>         verticalGap="0" horizontalGap="0">
>         <mx:Label text="{ data.severity}" width="100%" minHeight="0" />
> </mx:VBox>
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Upgrade to Adobe ColdFusion MX7
Experience Flex 2 & MX7 integration & create powerful cross-platform RIAs
http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJQ 

Archive: http://www.houseoffusion.com/groups/Flex/message.cfm/messageid:4358
Subscription: http://www.houseoffusion.com/groups/Flex/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.37

Reply via email to