开发者

How to set the Border Color of a Flex Spark Button with CSS

Is it possible? Or do I need to use Skin architecture? in I can't found the property border c开发者_运维问答olor, so I think I need to create a entire skin customized? Or are there the property accessible by css?


Create a custom Skin based on the default spark ButtonSkin. You'll notice a Rect named "border". The border is actually a gradient, I suggest you to replace it by a SolidColorStroke for now. Set an id to this stroke

In the updateDisplayList method, add : strokeId.color = getStyle("borderColor");

now you can use a borderColor property in your CSS file ;)


I think to change the border color is to create a custom skin, and set up the color of rectangles that draw the component. I haven't found accessors or property to set the color of the spark button border directly.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜