开发者

Using CSS to set style class

I've got the following CSS which I'd like to get working. I'm sure I've done something similar once, but I can't find the answer on google.

Basically some style properties have child properties which can be changed, suchas Container.borderSkin. You can set borderThickness, borderS开发者_如何转开发tyle etc, all on the borderSkin style.

<mx:Style>
        .myBorderSkin
        {
            borderThickness: 5;
            borderColor: #FF0000;
            /*borderStyle: none;*/
        }

        MyControl
        {
            borderSkin: .myBorderSkin;
        }
</mx:Style>

Unfortunatly when I run the application, I get the error "TypeError: Error #1034: Type Coercion failed: cannot convert "myBorderSkin" to Class."


This is what I was thinking of:

ButtonBar 
{ 
        buttonStyleName: "buttonBarButton"; 
        firstButtonStyleName: "firstButtonBarButton"; 
        lastButtonStyleName: "lastButtonBarButton";
}

.buttonBarButton 
{
        color: #000000;
        textRollOverColor: #000000;
        textSelectedColor:#000000; 
}

By setting the {x}StyleName property you can point it at a CSS selector.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜