--- In [email protected], "Josh McDonald" <[EMAIL PROTECTED]> wrote:
>
> It might work, but you really should look into reading some 
tutorials on the
> lifecycle of Flex components. Here's a few brief things:
> 
> * You want to create child components in the createChildren() 
method, not in
> your constructor. Your component may be instantiated long before it 
needs to
> have its children created.
> * Override the measure() function to set measuredWidth and 
measuredHeight,
> but the actual size will be set by your container
> * Override updateDisplaylist() to size and move your child 
components. Get
> their preferred sizes using child.getExplicitOrMeasuredWidth / 
Height in
> measure(), but set them using setActualSize(), not by setting the 
width and
> height. Position them with move()
> * There's a lot of good tutorials out there, google is your 
friend :)

I found it very difficult to find a tutorial that took me from the 
level of understanding where I was asking the kinds of questions the 
OP asked to where I was able to write my own components extending 
UIComponent.  The best one that I have found is this one 
http://weblogs.macromedia.com/pent/archives/2006/07/writing_flex_2.htm
l.

HTH;

Amy

Reply via email to