Thanks for mentioning that Tracey! I just realized it some minutes ago. Is
there no way to tell the TileList to not remove children that are not
visible?

 

I've used a MXML component as the itemRenderer but want to rewrite it in
ActionScript. It has a Label and an Image component in it. I've set a
dataProvider with a label and icon field in it in the TileList. How can I
access the label and icon data (used for the Image's source) in the
itemRenderer?

 

In createChildren() the data.icon/data.label are not yet available so I
always accessed them in an init() method that was called on
creationComplete. But I guess this is not the way to go since everytime I
scrolled the TileList it had a high impact on the item redrawing, giving me
a short delay before the items actually reappear. So where is a good
place/time to access the data property?

 

Thanks for the help so far!

Cheers,

Sascha

 

 

 

 

  _____  

From: [email protected] [mailto:[EMAIL PROTECTED] On
Behalf Of Tracy Spratt
Sent: Friday, 05 January, 2007 02:43
To: [email protected]
Subject: RE: [flexcoders] Removing the item gap in a TileList?

 

Remember that the visual elements in a list only exist when they are
visible.  Any setting af the visual state of an itemRenderer must be driven
by data in the dataProvider, and invoked in the set data() or
updateDisplayList functions().

 

You cannot successfully address a visual element from the "outside"

 

Tracy

 

  _____  

From: [email protected] [mailto:[EMAIL PROTECTED] On
Behalf Of Sascha
Sent: Thursday, January 04, 2007 8:37 AM
To: [email protected]
Subject: RE: [flexcoders] Removing the item gap in a TileList?

 

Thanks Paromita but when I set the rowHeight property of the TileList it
just crops my thumbnails and the 4px gap is still there.

 

Also I'm wondering how can I set properties in the itemRenderer instance
while it is somehow instanciated internally by the TileList?

Let's say I've made a custom itemRenderer named TileListerItem, and then I
associate it in the TileList:

 

itemRenderer = new ClassFactory(TileListerItem);

 

. and I'm using an Image component in the itemRenderer and want to set the
width and height of it at a later point, how do I access these properties
without having a tangible instance? Would be cool if somebody can give me a
hint there!

 

In any way, thanks a lot!

Sascha

 

 

  _____  

From: [email protected] [mailto:[EMAIL PROTECTED] On
Behalf Of paromita dey
Sent: Thursday, 04 January, 2007 21:54
To: [email protected]
Subject: Re: [flexcoders] Removing the item gap in a TileList?

 

I don't know if this would solve your problem but you can adjust the
vertical gap between the items of a tilelist by adjusting the rowHeight
property value. Set appropriate value for rowHeight in yout tilelist. 

 

Regards,

Paromita

Sascha <[EMAIL PROTECTED]> wrote:

Hi list,

I'm using a TileList component which is populated with thumbnail items. I've
wrote a custom itemRenderer for it that uses a HBox as the base. I want
there to be no gap between the thumbnails at all. Horizontally I can get rid
of any spacing by setting horizontal gap to 0 however this does not seem to
work with vertical gap. No matter what I'm trying I always get a vertical
gap of ~4 pixels.

The items that are put in the TileList are small thumbnails where the image
fills out the whole area of an item. I've tried other containers like Canvas
and Image for the itemRenderer too but without success.

Let's say my thumbnails are 32x32 pixels. I'm setting both h and v gap and
all padding of the HBox to 0, even set the rowHeight of the TileList to 32
but the vertical gap will appear and it seems the thumbnails are cropped.

Can somebody tell me how to get rid of the vertical spacing? Any other
simple container would be ok as the itemRenderer too.

Thanks for any help!
Sascha

 

 __________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

 

Reply via email to