Search code examples
apache-flexpanelskin

Flex Panel Content Background Color


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>

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.