谁能为这个面临的问题提供解决方案:我在 flash 4.6 中使用下拉列表,我在其中应用了自定义皮肤。按钮、标签、数据组中包含的自定义皮肤。所以,我想改变列表中特定项目的颜色,因为给定的选项只是改变背景 rollOverColor,selectionColor 但不是 contant 颜色。如果有人有解决方案,请帮助我。
自定义皮肤代码如下:
<s:Scroller left="0" top="0" right="0" bottom="0" focusEnabled="false" minViewportInset="1" >
<fx:Script>
<![CDATA[
import mx.events.FlexEvent;
import mx.utils.ObjectUtil;
protected function dataGroup_creationCompleteHandler(event:FlexEvent):void
{
dataGroup.setStyle('rollOverColor','black');
dataGroup.setStyle('selectionColor','black');
}
]]>
</fx:Script>
<s:DataGroup id="dataGroup" itemRenderer="spark.skins.spark.DefaultItemRenderer"
creationComplete="dataGroup_creationCompleteHandler(event)" mouseDown="mosuedownEvt(event)">
<s:layout>
<s:VerticalLayout gap="0" horizontalAlign="contentJustify" />
</s:layout>
</s:DataGroup>
</s:Scroller>