First, do away with the collections and just try it with XML. XML works extremely well with Tree, since it is inherently hierarchical. Nested collections add a level of complexity you probably do not need.
Tracy ________________________________ From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Rafael Faria Sent: Tuesday, April 22, 2008 7:13 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Showroot - Tree control any help?! im really tight on it. =/ Thanks Raf --- In flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com> , "Rafael Faria" <[EMAIL PROTECTED]> wrote: > > <?xml version="1.0"?> > <!-- dpcontrols/TreeSimple.mxml --> > <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml <http://www.adobe.com/2006/mxml> "> > <mx:Tree id="tree1" labelField="@label" showRoot="false" width="160"> > <mx:XMLListCollection id="MailBox"> > <mx:XMLList> > <folder label="Mail"> > > </folder> > </mx:XMLList> > </mx:XMLListCollection> > </mx:Tree> > </mx:Application> > > Whenever i have just 1 node (that is the root one) on the XML it > doesnt matter if i set the attribute showRoot="false" because it keep > showing. > > I need to keep the root to not show on my tree. > > > if i do > > > <?xml version="1.0"?> > <!-- dpcontrols/TreeSimple.mxml --> > <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml <http://www.adobe.com/2006/mxml> "> > <mx:Tree id="tree1" labelField="@label" showRoot="false" width="160"> > <mx:XMLListCollection id="MailBox"> > <mx:XMLList> > <folder label="Mail"> > <folder label="INBOX"/> > <folder label="Personal Folder"> > <Pfolder label="Business" /> > <Pfolder label="Demo" /> > <Pfolder label="Personal" isBranch="true" /> > <Pfolder label="Saved Mail" /> > </folder> > <folder label="Sent" /> > <folder label="Trash" /> > </folder> > </mx:XMLList> > </mx:XMLListCollection> > </mx:Tree> > </mx:Application> > > > The "Mail" one its not there... > > i cant filter, or delete, or whatever... i just need it to work > exactly how it work on the second example, but whenever i dont have > the nodes after the root i just want to show a blank tree. > > The reason i need to keep root is because i have a drag and drop the > needs to keep the root on it. > > anyone can explain why in the first example even though i set > showroot="false" it still show it?! > > thanks >