我想根据条件填充颜色,所以我对复选框使用了条件运算符。但它显示错误Implicit coercion of a value of type String to an unrelated type Array
。我做错了什么 ?我如何动态改变复选框的颜色?是否可以在复选框中使用条件运算符使用flex?
<mx:CheckBox id="home" enabled="false" fillColors="{(data.actualwin != '1') ?
'[#8CE912,#8CE912]' : '[#8CE912,#8CE912]'}" selected="{data.betting_home=='1'}"/>
感谢artemb。我发现问题 fillColors =“{[(data.actualwin =='2')?'#66ff00':'#ffffff']}” – 2009-10-21 05:35:21