Thanks Josh

This example was a simple case. What I actually want to is have my
component behave like a container where it centres its child items. In
retrospect I would have to extend from the Container class. 

The absoulte size would fix the problem (in that the item re-draws
would occur underneath each other & would not be visible). I was just
worried that I was getting a lot of outdated screen objects that
aren't being cleaned up when drawing underneath each other. But I
suppose it's only 1 graphics layer.

Cheers
Tracy



--- In flexcoders@yahoogroups.com, "Josh McDonald" <[EMAIL PROTECTED]> wrote:
>
> Components don't set explicitWidth and explicitHeight on themselves,
they're
> (optionally) set by the container, and actual sizing is set by the
container
> through setActualSize().
> 
> Override measure(), and set measuredWidth and measuredHeight to
match your
> label, and your problems may go away. Also in updateDisplayList you
want to
> set the actual size of the label to the minimu of it's measured size and
> unscaledWidth x unscaledHeight.
> 
> -Josh

>


Reply via email to