Ok you’re a genius. Now the only thing I have to do is find a way to hide the disclosureIcon when the “fake” branch doesn’t contain children.

I guess I have access to that in my itemrenderer, so let’s check it out.

 

Thanks a lot.

 


From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Renaun Erickson
Sent: dinsdag 11 juli 2006 16:51
To: [email protected]
Subject: [flexcoders] Re: Explorer-like drag & drop tree

 

If you are using XML as the dataProvider, you should be able to put
isBranch="true" into the XML and it will force it to be a Branch.

If you are using nested Objects and ArrayCollections as your
dataProvider, you have to set the "children" attribute to "new
Array()" to get it to work as a branch.

Renaun

--- In [EMAIL PROTECTED]ups.com, "Jonas Windey" <[EMAIL PROTECTED]> wrote:
>
> I'm trying to create a folder-manager in flex that allows a user to
move,
> create and delete folders.
>
> The folderstructure gets sent to the client in xml format, like this:
>
>
>
> <root>
>
> <folder label="ftproot">
>
> <folder label="subfolder1" />
>
> <folder label="subfolder2" />
>
> </folder>
>
> <folder label="ftproot2" />
>
> </root>
>
>
>
> Etc.
>
>
>
> This is all working well, I get a treeview, and with some custom
icons it
> looks exactly like the explorer in windows.
>
> The problem arrives when folders are seen as leafs instead of nodes
(like
> every deepest folder for instance, is seen as a leaf)
>
>
>
> To enable true drag & drop, every node, also the leafs, should act as a
> node. In explorer for instance, if you drag a folder on another
folder, it
> is automatically seen as a subfolder.
>
> Since Flex doesn't allow items to be dragged onto a leaf, I'm having a
> problem here. Once every folder is on the root node for instance, it's
> impossible to move any folder onto another folder.
>
>
>
> Anyone with a suggestion? I suppose I'll have to create a custom
> itemrenderer and force every item so it 'thinks' it has childnodes, but
> maybe someone could give me a good direction here.
>
>
>
> Thanks
>


__________ NOD32 1.1653 (20060711) Information __________

This message was checked by NOD32 antivirus system.
http://www.eset.com

__._,_.___

--
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




__,_._,___

Reply via email to