自定义flex mx Canvas borderThickness不起作用

时间:2010-12-24 10:29:22

标签: flex canvas coding-style

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不适用。 Iwrong与canvas样式初始化有什么关系?

1 个答案:

答案 0 :(得分:0)

使用此link解决您的问题。您的边框厚度需要围绕“5”的引号:

canvasEdit.setStyle("borderThickness","5");