i havent looked for any code to do this, but all outliners do it, including the one in ms word. I really dont understand how dragging stuff around is useful if you cant change parent/child relationships. your strategy makes sense to me. The key thing is feedback, so you can see where its going to go when you release the mouse. I'm just getting into drag and drop so I dont know much about the mechanics or internals of how you make this stuff work.
Regards, Hank On 12/7/06, Essl, Markus <[EMAIL PROTECTED]> wrote: > > I have had the same problem, but didn't find a solution. Moreover, I > tried to look at existing UIs (windows, java, .net and such frameworks > and programs), but I could not find an implementation of a tree that > support that. Do you know of such a program where I can look at that > behaviour? > > My solution will be that depending on the mouse position (x value > > center of tree) to add the dropped item as a child of that item, > otherwise as a sibling. > > Of course, the handling of the drop must be done manually. > > I've done work so far so that I can copy items; which was quite horrible > for me, as I didn't find out how to easily update the model after the > drop. Somehow I made it work. Now I want to make this reusable some how, > but didn't figure out how exactly I should approach this. > > > Markus > > > > > ________________________________ > > Von: [email protected] > [mailto:[EMAIL PROTECTED] Im Auftrag von hank williams > Gesendet: Mittwoch, 06. Dezember 2006 21:55 > An: [email protected] > Betreff: [flexcoders] Tree drag & drop > > > > with dragEnabled, dropEnabled, dragMoveEnabled all set to true I > am > able to drag an Item from one place in a tree to another. The > only > problem is that I dont seem to be able to promote or demote an > item. > meaning I can drag an item to a sibling position of another > item, but > not to a child of another item. Is this just a limitation of the > tree > control code or am I missing something. > > Hank > > > -- > 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 > > > >

