What
you want to do is extend the TileListItemRenderer in your own as class. Then set
the listItemRenderer property on the tilelist to the name of your class. Your
going to want to override at least the dataObject property so you can see
the data getting passed in. This is how i've been doing this type of thing, may
be a better way though..
None
tested code:
MyTilerender.as
package {
import mx.controls.listclasses.TileListItemRenderer;
public class MyTileRenderer extends TileListItemRenderer {
public function MyTileRenderer(){
super();
}
override public function set dataObject(value:Object):void {
super.dataObject=value;
if (value !=null){
import mx.controls.listclasses.TileListItemRenderer;
public class MyTileRenderer extends TileListItemRenderer {
public function MyTileRenderer(){
super();
}
override public function set dataObject(value:Object):void {
super.dataObject=value;
if (value !=null){
// change the value.complete to
value.yourpropertyname or [EMAIL PROTECTED]
if (value.complete ==
"true"){
setStyle("color","#A7A7A7");
}
else
{
clearStyle("color");
}
}
}
}
}
setStyle("color","#A7A7A7");
}
else
{
clearStyle("color");
}
}
}
}
}
the
tile list:
<mx:TileList listItemRenderer="MyTileRenderer" id="test"
dataProvider="yourDS" />
Something to that effect, I've never tried it on a tilelist, but it works
great for trees and datagrids.. The above should get you
started.
Hope
this helps
Jason
-----Message d'origine-----Matt, hi
De : [email protected] [mailto:[EMAIL PROTECTED]De la part de Dmitry Miller
Envoyé : samedi 18 mars 2006 01:16
À : [email protected]
Objet : [flexcoders] Re: TileList ItemRenderer question - please help
I do want to extent SelectableItem since I want to introduce a new
TileList cell state and I want to change the appearance for default
itemRenderer as well. Please, let me know how would I be able to do that
Thanks,
--- Dmitry
--- In [email protected], "Matt Chotin" <[EMAIL PROTECTED]> wrote:
>
> I don't think you want to extend SelectableItem, that's our own class.
> SelectableItem will hold onto your instance of the cellRenderer
> internally. Take a look at the photoviewer samples (assuming 1.5).
>
> Matt
>
> -----Original Message-----
> From: [email protected] [mailto:[EMAIL PROTECTED] On
> Behalf Of Dmitry Miller
> Sent: Friday, March 17, 2006 2:03 PM
> To: [email protected]
> Subject: [flexcoders] TileList ItemRenderer question - please help
>
> I need to make custom ItemRenderer in TileList. I create a class that
> extends mx.controls.listclasses.SelectableItem and specify this class
> name for itemRenderer in my TileList. As the result I get an empty
> TileList. Can anyone point me to an example of how to create and
> assign a custom cell renderer for a TileList?
>
> Thanks,
>
> --- Dmitry
>
>
>
>
>
>
>
> --
> Flexcoders Mailing List
> FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
> Search Archives:
> http://www.mail-archive.com/flexcoders%40yahoogroups.com
> Yahoo! Groups Links
>
--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
SPONSORED LINKS
Web site design development Computer software development Software design and development Macromedia flex Software development best practice
YAHOO! GROUPS LINKS
- Visit your group "flexcoders" on the web.
- To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
- Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.

