0 Replies Latest reply on Mar 18, 2010 12:40 PM by yzarcman

    Custom Canvas Shape visible in design view of flex builder

    yzarcman

      I have a library which has custom controls. I have a BubbleCanvas class with the following constructor.
            super();
            var style:CSSStyleDeclaration;
           
            this.setStyle("backgroundImage", canvasBackground);
            this.setStyle("backgroundSize", "100%");
           
            var btnSave:LinkButton = new LinkButton();
            style = new CSSStyleDeclaration();
            style.setStyle("horizontalCenter", 0);
            style.setStyle("bottom", 20);
            btnSave.label = "save";
            btnSave.styleDeclaration = style;
            btnSave.addEventListener(MouseEvent.CLICK, btnSave_Click);
            this.addChild(btnSave);

       

            var btnClose:LinkButton = new LinkButton();
            style = new CSSStyleDeclaration();
            style.setStyle("horizontalCenter", 0);
            style.setStyle("top", 5);
            btnClose.label = "close";
            btnClose.styleDeclaration = style;     
            btnClose.addEventListener(MouseEvent.CLICK, btnClose_Click);
            this.addChild(btnClose);

       

            this.addEventListener(FlexEvent.CREATION_COMPLETE, BubbleForm_CreationComplete);
            this.width = 600;
            this.height = 300;

       

      canvasBackground is a png image with transparency so that the form is shaped  like a
      conversation bubble.

      Now at run time everything works great, what I would like is to have the  control
      look like a conversation bubble in the design view of flex.

      Oh I only want actionscript code, since the flex sdk controls are all
      actionscript. This is partly acedemic for me.

      Thanks,
      Greg