代码之家  ›  专栏  ›  技术社区  ›  FlyingCat

柔性面板内容背景色

  •  0
  • FlyingCat  · 技术社区  · 15 年前

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

    我的皮肤文件

    /<!-- 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>
    
    2 回复  |  直到 14 年前
        1
  •  2
  •   michael    15 年前

    尝试:

            <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>
    

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

        2
  •  1
  •   igu    14 年前

    我也有同样的问题。

    解决方案是删除重写的updateDisplayList函数中的行:backgroundFill.color=getStyle(“backgroundColor”);

    可能对其他搜索者有帮助。:)

    推荐文章