This project is read-only.

Funny Behaviour about Drag & Drop between TreeNodes

Nov 16, 2010 at 3:39 PM


I have some funny situations about my drag and drop between TreeNodes insides the tree. I have got the draggedTreeNode and dropTreeNode correctly and implemented Drag&Drop with the following code:

windown.Mouse.DragAndDrop(draggedTreeNode, dropTreeNode);

If draggedTreeNode is not selected firstly, programm runs without exception and Drag&Drop runs, but nothing is dropped into the dropTreeNode.

If draggedTreeNode is selected, whether dropTreeNode is selected or not, in my getestet system, Drag&Drop runs like Copy/Paste(the draggedTreeNode exists not only in dropTreeNode, but also in original folder), not Cut/Paste, but in manuell test, it is Cut/Paste.

In SourceCode, I think the selection of the draggedItem is already included:


So I think there is no need to select draggedItem again und has somebody Drag&Drop Operation like Copy in AutoTest, the same with mine?

Thanks very much!


Nov 16, 2010 at 3:46 PM
Edited Nov 16, 2010 at 3:46 PM

Another situation, if the two TreeNodes are nearby, Drag&Drop is ok (Cut/Paste), Drag&Drop like Copy/Paste take places only, two TreeNodes are not so close.

Nov 23, 2010 at 1:50 PM

Have you tried setting DragStepCount value to visually check what is going on. If it still doesn't work can you provide some code sample for the same.

Nov 23, 2010 at 2:51 PM

Thank you!

but what is the function of DragStepCount? I don't quite understand about it.

Nov 25, 2010 at 6:57 AM