[英]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 color, so I think I need to create a entire skin customized?
我找不到属性边框颜色,所以我想我需要创建一个定制的整个皮肤吗? Or are there the property accessible by css?
还是有CSS可以访问的属性?
Create a custom Skin based on the default spark ButtonSkin. 基于默认的Spark ButtonSkin创建自定义外观。 You'll notice a Rect named "border".
您会注意到一个名为“ border”的Rect。 The border is actually a gradient, I suggest you to replace it by a SolidColorStroke for now.
边框实际上是一个渐变,我建议您暂时将其替换为SolidColorStroke。 Set an id to this stroke
设置此笔画的ID
In the updateDisplayList method, add : strokeId.color = getStyle("borderColor"); 在updateDisplayList方法中,添加:strokeId.color = getStyle(“ borderColor”);
now you can use a borderColor property in your CSS file ;) 现在您可以在CSS文件中使用borderColor属性;)
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.
我还没有找到直接设置火花按钮边框颜色的访问器或属性。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.