Is it possible you set explicit rowHeight and columnWidth?
commitProperties() should get called followed by makeRowsAndColumn.

 

-Alex

 

________________________________

From: [email protected] [mailto:[EMAIL PROTECTED] On
Behalf Of Daniel Grace
Sent: Friday, May 18, 2007 2:22 PM
To: [email protected]
Subject: Re: [flexcoders] TileList itemRenderer resize

 

I added the following code to the TileList:

            public override function set dataProvider(o: Object): void {
                if (this.dataProvider) {
                    this.dataProvider.removeEventListener
("collectionChange", this.cc);
                }
                
                super.dataProvider = o;
                this.dataProvider.addEventListener("collectionChange",
this.cc);
                this.callLater(this.cc);
            }
            
            private function cc(event: Event = null): void {
                this.itemsNeedMeasurement = true;
                this.invalidateProperties ();
            }

I have added (and since removed, since it was noisy) an alert to my cc
function, so I know that it's getting called when my underlying data
gets changed... but the individual tiles still aren't resizing. I can
see the very top part of the unhidden data in the tiles, but it doesn't
expand to see the rest. 

Am I handling this in the wrong place?

TIA,
Daniel

On 5/18/07, Alex Harui <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> >
wrote: 

Try setting itemsNeedMeasurement=true and calling
invalidateProperties().

 

________________________________

From: [email protected] <mailto:[email protected]>
[mailto: [email protected] <mailto:[email protected]>
] On Behalf Of Daniel Grace
Sent: Friday, May 18, 2007 12:26 PM
To: [email protected] <mailto:[email protected]> 
Subject: [flexcoders] TileList itemRenderer resize

 

I am using a mostly default (some options, no subclassing) TileList
with a custom itemRenderer. I have been using the same itemRenderer
for a while with no problems. I made a change to where one of the UI
elements inside of this itemRenderer sets its visible and
includeInLayout to false depending on the underlying data. When this
happens the height of the itemRenderer should change, but the TileList
doesn't seem to realize this.

I am assuming that the TileList does a height/width calculation early
on and doesn't notice that things are different. I am fine with
subclassing, but at this point I don't know where to look for the
right functions/events to latch on to to make this work as I expect.

BTW, I know that the measurements are based off of the first data
element, but because of the way this actual application works all of
its itemRenderers will be the same size -- they just need to change
sizes at runtime sometimes.

TIA,
Daniel

 

 

Reply via email to