Css 如何设置MX面板标题背景颜色

Css 如何设置MX面板标题背景颜色,css,actionscript-3,air,panel,Css,Actionscript 3,Air,Panel,我想设置MX面板的背景色。我可以更改标题的文本颜色,但不能更改背景颜色 我正在使用以下代码: .Panel { textAlign: center; borderColor: #33cccc; borderThicknessLeft: 6; borderThicknessTop: 0; borderThicknessBottom: 10; borderThicknessRight: 6;

我想设置MX面板的背景色。我可以更改标题的文本颜色,但不能更改背景颜色

我正在使用以下代码:

.Panel {
        textAlign: center;
        borderColor: #33cccc;
        borderThicknessLeft: 6;
        borderThicknessTop: 0;
        borderThicknessBottom: 10;
        borderThicknessRight: 6;
        roundedBottomCorners: true;
        cornerRadius: 8;
        headerHeight: 22;
        backgroundAlpha: 0.97;
        highlightAlphas: 0.34, 0.06;
        dropShadowEnabled: true;
        shadowDistance: 8;
        shadowDirection: left;
        dropShadowColor: #5b3d24;
        titleStyleName: "mypanelTitle"; 

    }

    .mypanelTitle {
        background-color: #5b3d24;
        color: #5b3d24;
        background: #5b3d24;
        fontFamily: Arial;
        fontSize: 12;
        fontWeight: bold;
    }
请帮我设置标题颜色

谢谢
卡皮尔

你试过背景色吗?对于mx:Panel(Flex4.6),它对我来说很好

更新:

对不起,我以前的回答不正确。如果使用光晕主题,可以尝试headerColors样式属性(我现在无法测试)

第二种方法-为标题创建自己的自定义外观。下一步将是:

Main.mxml

css属性标题BackgroundSkin中的注意事项将是下一步:

    .panel {
        titleBackgroundSkin: ClassReference("CustomTitleBackgroundSkin");
    }

是的,我试过了,但没有成功。你能给我寄样品代码吗?我在空中做这件事。我没有仔细阅读你的问题,所以我误解了你。所以我更新了我的答案。嘿!!!你太棒了!这对我有用。非常感谢你。事实上,我是一名.Net开发人员和WindowsAzure架构师。但现在正在开发小型AdobeAIR应用程序。我向你致敬。我很高兴这对你有帮助
package
{
import mx.core.UIComponent;

public class CustomTitleBackgroundSkin extends UIComponent
{
    public function CustomTitleBackgroundSkin()
    {
        super();
    }

    override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void
    {
        graphics.clear();
        graphics.beginFill(0xff0000);
        graphics.drawRect(0, 0, width, height);
        graphics.endFill();
    }
}
}
    .panel {
        titleBackgroundSkin: ClassReference("CustomTitleBackgroundSkin");
    }