Question

I am trying to set the gradient background color for my panel via skins. I try to change my code but nothing seems to change. Not sure what to do. Thanks for any reply.

My skin file

/<!-- 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>
Was it helpful?

Solution

Try :

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

Edit:

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

I have tried the above code. It works well.

OTHER TIPS

I had the same problem.

The solution is to remove line in overrided updateDisplayList function: backgroundFill.color = getStyle("backgroundColor");

Maybe it could be helpful for other searchers. :)

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top