I've been trying to figure out this issue, and I'm still confused. I suspect it may have something to do with the labelField attribute. Does anyone have any ideas?
----- Original Message ---- From: S B <[EMAIL PROTECTED]> To: flexcoders@yahoogroups.com Sent: Friday, June 13, 2008 1:14:49 PM Subject: Re: [flexcoders] Custom TreeItemRenderer not rendering children When I do that, the data displays fine. For example, suppose I use the following as my data provider: <mx:XMLList id="treeData"> <node label="Random things"> <node label="Dice"> <node label="8-sided"/> <node label="20-sided"/> </node> <node label="Coins"/> </node> </mx:XMLList> If I create a normal mx:Tree without any custom things going on... <mx:Tree dataProvider="{treeData}" labelField="@label" width="100%" height="100%"/> ...the data shows up perfectly. When I use the custom itemRenderer... <mx:Tree dataProvider="{treeData}" itemRenderer="InlineColorPicker" width="100%" height="100%"/> (where InlineColorPicker refers to the itemRenderer I mentioned in my first email)...only "Random Things" appears, albeit with the color picker next to it. If showRoot=false, then only "Dice" and "Coins" appear, both with color pickers. When drawing the mx:Tree with the custom item renderer, I removed the labelField attribute because the label is explicitly defined in the InlineColorPicker class. ----- Original Message ---- From: Alex Harui <[EMAIL PROTECTED]> To: flexcoders@yahoogroups.com Sent: Friday, June 13, 2008 12:52:54 PM Subject: RE: [flexcoders] Custom TreeItemRenderer not rendering children If you don’t use the custom renderer, do you still only see the root? ________________________________ From:[EMAIL PROTECTED] ups.com [mailto: [EMAIL PROTECTED] ups.com ] On Behalf Of svbhamid Sent: Friday, June 13, 2008 11:55 AM To: [EMAIL PROTECTED] ups.com Subject: [flexcoders] Custom TreeItemRenderer not rendering children I have a custom item renderer for an mx:Tree, shown here: <mx:HBox xmlns:mx="http://www.adobe. com/2006/ mxml"> <mx:Script> [Bindable] public var selectedColor: Number; </mx:Script> <mx:Binding source="cp.selected Color" destination= "selectedColor" /> <mx:ColorPicker id="cp" selectedColor= "0xFFFFFF" /> <mx:Label text="{data. @label}"/ > </mx:HBox> It is supposed to display a color picker next to the label of the node. However, when I display an instance of an mx:Tree which uses this item renderer, only the root appears (or, if showRoot=false, only the first-depth children) although the data contains second- and third-depth children. I have tried to resolve the issue, but to no avail. Why aren't all the nodes appearing? Thanks in advance!