For the Adobe folks: why the difference in the itemRenderers from component to component? Do you plan on standardising on doing it one way? I would hope the answer is yes, as it would sure make things a lot easier for the new folks.
ItemRenderers are not styles, for DataGrid , TileList , … it's a IFactory setter / getter
I don't exactly know for Charts but for a TileList you can do as simple as this :
myTile .itemRenderer = new ClassFactory( myThumbnail );
Cheers,
From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of Pan Troglodytes
Sent: Monday, June 19, 2006 3:33 PM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] how to assign itemRenderer w/ActionScript
itemRenderers ARE styles, the help just hasn't completely been updated yet.
You were actually very close.
myTile.setStyle("itemRenderer", new ClassFactory(myThumbnail));
You may have to fully qualify it:
myTile.setStyle("itemRenderer", new ClassFactory(itemRenderers.myThumbnail));
Now, as to how to manipulate it after this, I don't know. See my thread "changing out pieSeries.itemRenderer at runtime" where I'm asking the same thing.On 6/19/06, keishichi2001 <[EMAIL PROTECTED]> wrote:
I've trying following code to assign custom renderer into itemRenderer
property on a TileList.
You'll see commented part, which works well.
However, I just want to try how i can do this by ActionScript.
Following code reports no error, but each cell is empty(actually
printed 'object Object').
Someone could help me out?
k
====
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" xmlns:comp="*"
creationComplete="init()">
<mx:Script>
<![CDATA[
import itemRenderers.myThumbnail;
import mx.collections.ArrayCollection;
[Bindable]
private var photoColl:ArrayCollection;
private var mT:myThumbnail = new myThumbnail;
private function init():void
{
simpletest.send();
myTile.setStyle("itemRenderer", mT);
}
]]>
</mx:Script>
<mx:Label id="foodName"
text="Watch here"/>
<mx:HTTPService id="simpletest"
url=""> result="photoColl=new
ArrayCollection(simpletest.lastResult.list.food)"/>
<mx:TileList id="myTile"
dataProvider="{photoColl}"
width="700"
rowHeight="170"
columnWidth="220"/>
<!--
<mx:TileList id="foodTile"
dataProvider="{photoColl}"
itemRenderer="itemRenderers.myThumbnail"
width="700"
rowHeight="170"
columnWidth="220"/>
-->
</mx:Application>
====
--
--
Jason
--
--
Jason __._,_.___
--
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.
__,_._,___
- [flexcoders] how to assign itemRenderer w/ActionScript keishichi2001
- Re: [flexcoders] how to assign itemRenderer w/Actio... Tom Chiverton
- RE: [flexcoders] how to assign itemRenderer w/Actio... Yaniv De Ridder
- [flexcoders] Connection Debugging Bjorn Schultheiss
- Re: [flexcoders] Connection Debugging Abdul Qabiz
- Re: [flexcoders] Connection Debugging Jeremy Lu
- Re: [flexcoders] how to assign itemRenderer w/Actio... Pan Troglodytes
- RE: [flexcoders] how to assign itemRenderer w/A... Yaniv De Ridder
- Re: [flexcoders] how to assign itemRenderer... Pan Troglodytes
- Re: [flexcoders] how to assign itemRenderer w/A... Michael Schmalle
- Re: [flexcoders] how to assign itemRenderer... Pan Troglodytes
- Re: [flexcoders] how to assign itemRend... Michael Schmalle
- Re: [flexcoders] how to assign itemRend... Tom Chiverton
- Re: [flexcoders] how to assign ite... Pan Troglodytes
- Re: [flexcoders] how to assign... Tom Chiverton
- Re: [flexcoders] how to as... Pan Troglodytes
- RE: [flexcoders] how to as... Ely Greenfield
- RE: [flexcoders] how to assign itemRenderer w/Actio... Daniel Tuppeny
- Re: [flexcoders] how to assign itemRenderer w/A... Michael Schmalle
Reply via email to