Sorry fpr the late reply,

my Problem is in fact not implementing teh measure() method. It is more the 
problem how 
to deal with composites and detecting changes of components that are embedded 
in my 
custom component.

My current strategy is dispatching an event when the displaylist of my embedded 
composite changes in order to call measure of my container.

Example: i have a container which is a composite of my own list component. When 
i 
change the contents of my list, the diaplaylist of the list will be updated and 
the container 
will be informed in order to call measure. Layoutcontainers are now able 
refresh the 
layout with the right sizes.

Is that a good strategy or is there something else i missed to detect changes 
in the 
container automatically? Do i have to dispatch events by my own or is their 
some kind of automatism i did not think of?

Best regards.


--- In [email protected], "Michael Schmalle" <[EMAIL PROTECTED]> wrote:
>
> Hi,
> Search the archives for this, I know I have explained it quite a bit. :)
> 
> If you can't find it there read up on "Creating Custom Components".
> 
> You problem has to do with the fact you have not overridden measure() and
> set measuredWidth and measuredHeight of you component.
> 
> If you don't do this, the layout manager will set the size of your component
> to 0,0.
> 
> Mike
> 
> On Wed, Oct 1, 2008 at 4:02 AM, florian.salihovic <
> [EMAIL PROTECTED]> wrote:
> 
> >   I have a UIComponent which Dimensions never change?! When i add a child
> > in the overriden
> > createChildren i expect the dimensions to be changed... but nothing
> > happens...
> >
> > override protected function createChildren():void {
> > super.createChildren();
> > if (!this._uibase) {
> > this._uibase = new UIBase();
> > this.addChild(_uibase);
> > }
> >
> > The UIBase class is a component made with the Flex Component Kit and it has
> > width an
> > height > 0.
> >
> > I have no clue what i am doin wrong...
> >
> >  
> >
> 
> 
> 
> -- 
> Teoti Graphix, LLC
> http://www.teotigraphix.com
> 
> Teoti Graphix Blog
> http://www.blog.teotigraphix.com
> 
> You can find more by solving the problem then by 'asking the question'.
>



Reply via email to