[Logo] Enterprise Client Community
  [Search] Search   [Recent Topics] Recent Topics   [Members]  Member Listing   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
Drag And Drop within a Tree  XML
Forum Index -> Development
Author Message
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?!
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?
CaptainCasa

Power User
[Avatar]

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
 
Forum Index -> Development
Go to:   
Powered by JForum 2.1.6 © JForum Team