Hi there,

I've been working on some ActionScript-only, UIComponent-derived  
classes, and haven't been able to figure out how to make them visible  
in Flex Builder's MXML design view. For instance, given the class:

package com.example
{
        import mx.containers.Box;
        public class PinkBox extends Box
        {
                public function PinkBox()
                {
                        super();
                        setStyle('backgroundColor', '#ff0099');
                }
        }
}

And the MXML document:

<mx:Application xmlns:example="com.example.*">
   <example:PinkBox width="100" height="100" />
</mx:Application>

I would assume that Flex Builder's design view actually renders the  
swf in some special mode. But if that were the case the box would be  
pink (it's not; it's completely invisible until you click on it). Of  
course, setting the "backgroundColor" to "#ff0099" in the design view  
style pane yields the desired effect.

So the question is, How does one specify how custom components are  
rendered in Flex Builder's design view?

Cheers,
-- 
Shawn Allen
+1 415.577.3961


Reply via email to