自定义 flex mx Canvas borderThickness 不起作用
package custom
{
import mx.containers.Canvas;
public class CustomCanvas extends Canvas
{
public function CustomCanvas()
{
super();
}
override protected function commitProperties():void
{
super.commitProperties();
this.setStyle('backgroundColor',0x0055ff);
this.setStyle('borderColor',0x00aaff);
this.setStyle('borderThickness',5);
this.setStyle('borderStyle',"solid");
}
}
}
borderThickness 样式不适用。画布样式初始化有什么问题?
package custom
{
import mx.containers.Canvas;
public class CustomCanvas extends Canvas
{
public function CustomCanvas()
{
super();
}
override protected function commitProperties():void
{
super.commitProperties();
this.setStyle('backgroundColor',0x0055ff);
this.setStyle('borderColor',0x00aaff);
this.setStyle('borderThickness',5);
this.setStyle('borderStyle',"solid");
}
}
}
The style borderThickness doesn't apply. What Iwrong with canvas style initialization?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
使用此链接来解决您的问题。您需要在“5”周围加上引号以表示边框厚度:
Use this link to address your issue. You need quotes surrounding the "5" for your border thickness: