Author |
Message |
30/06/2008 17:17:47
|
foedeles
Active
Joined: 14/04/2008 13:10:31
Messages: 19
Offline
|
Is it possible to drag and drop a sub-node out of a top-node to an other top-node within a simple-tree?!
|
|
|
30/06/2008 17:47:09
|
foedeles
Active
Joined: 14/04/2008 13:10:31
Messages: 19
Offline
|
Okay, I tried and it works!- but with restrictions in my case.
My issue is: I have two trees. A tree on the left - and another on the right side of my page. First I drag a sub-node from the left tree and drop it into a top-node of the right tree, no problem.
But now i want to drag and drop this sub-node within the right tree into a sub-node which I created by drag and drop as well.
So is it possible to create sub-nodes from a sub-node within a simple tree, via drag and drop?
|
|
|
30/06/2008 19:25:04
|
CaptainCasa
Power User
Joined: 21/11/2007 12:23:06
Messages: 5521
Offline
|
Hi,
drag & drop is "just" the transfer of drag information (DRAGSEND) to a receiver node. The DRAGSEND info consists of "type:data" and the receiving node speficies DROPRECEIVE info consisting out of "type;type".
When info is dropped then the receiving node receives an event of tpye BaseActionEventDrop/DropCopy. Via the API of BaseActionEventDrop you can get the DRAGSEND info from the original component, you dragged from.
You see: drag&drop is, by intention, a very generic mechanism. THe reaction (e.g. cutting one tree branch and putting the into another tree branch) is completely up to you. Result: you can do "what you want".
Just, again, to make sure: there is NO implicit cutting and pasting of treenodes which is part of drag&drop. This is up to you to implement.
Hope, this answer helps you...!
Björn
|
Björn Müller, CaptainCasa GmbH |
|
|
|