[英]Change BorderContainer background color with AS - Flex 4
I'm trying to change the background color and or text color of a BorderContainer in flex 4 using Action Script, but have not idea how to. 我正在尝试使用Action Script更改flex 4中BorderContainer的背景颜色和/或文本颜色,但不知道如何更改。
The Border Container component doesn't seem to have any properties like: Border Container组件似乎没有任何属性,例如:
idname.color = "#333333"; idname.color =“#333333”; idname.backgroundcolor = "#333333";
idname.backgroundcolor =“#333333”;
How might I go about doing this? 我该怎么做呢?
thanks! 谢谢!
您可以像这样在ActionScript中设置样式(与属性不同):
idname.setStyle("backgroundColor", 0xff0000);
不确定这是否是唯一的方法,但是通过创建CSS样式,您可以更改背景,文本颜色和其他样式属性,并在Action Script中调用样式的名称。
idname.styleName = "css-stylename";
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.