0

我正在尝试通过皮肤为我的面板设置渐变背景颜色。我尝试更改我的代码,但似乎没有任何改变。不知道该怎么办。感谢您的回复。

我的皮肤文件

/<!-- layer 2: background fill --/>
        <!--- Defines the appearance of the PanelSkin class's background. -->
        <s:Rect id="background" left="1" top="1" right="1" bottom="1">
            <s:fill>
                <!--- @private
    Defines the  PanelSkin class's background fill. The default color is 0xFFFFFF. -->
            <s:SolidColor id="backgroundFill" color="red"/>  //Change to red but                 
                                                            //nothing happen....
            </s:fill>
        </s:Rect>
4

2 回答 2

2

尝试 :

        <s:fill>
        <s:SolidColor color="0xFF0000"/>
    </s:fill>

编辑:

    <s:Rect id="background" left="1" top="1" right="1" bottom="1">
    <s:fill>
        <s:SolidColor id="backgroundFill" color="0xFF0000"/>                
    </s:fill>
</s:Rect>

我试过上面的代码。它运作良好。

于 2010-06-11T02:01:47.377 回答
1

我有同样的问题。

解决方案是删除覆盖 updateDisplayList 函数中的行: backgroundFill.color = getStyle("backgroundColor");

也许它可能对其他搜索者有所帮助。:)

于 2010-10-07T13:36:29.080 回答