ClassFactory doesn't support setting styles; they're different than properties. 
 You can get around this by either:

1) use a custom item renderer that has a styleName or css selector.

2) extend ClassFactory to support setting styles on the item renderer 
instances.  See com.blogagic.core.UIComponentFactory at 
http://blogagic.com/_flex/libagic_source/srcview/index.html

-TH

--- In flexcoders@yahoogroups.com, "bhaq1972" <mbhaque@...> wrote:
>
> GridColumn doesn't have the textAlign style. Instead we can do this -
> 
> <s:GridColumn id="col" dataField="etc">
>   <s:itemRenderer>
>     <fx:Component>
>       <s:DefaultGridItemRenderer textAlign="right" color="black"/>
>       ..
> 
> How can I do this in actionscript? I've tried the following but doesn't work
> 
> var renderer1:ClassFactory = new ClassFactory(DefaultItemRenderer);
> renderer1.properties = { textAlign:"right", color:0xff00ff };
> col.itemRenderer = renderer1; //doesnt work
>


Reply via email to