Hi
I can't find the solution to this problem : I want to know on which item of my tree, the content of event.dataTransfer.getData("text/plain") will be dropped during a drag & drop operation...
++
drag and drop between trees
-
- Posts: 120
- Joined: October 14th, 2004, 2:06 pm
Re: drag and drop between trees
got it :
Code: Select all
stopDrag: function (aEvent) {
var myTree = document.getElementById('dirTree');
// get the row, col and child element at the point
var row = { }, col = { }, child = { };
myTree.treeBoxObject.getCellAt(aEvent.clientX, aEvent.clientY, row, col, child);
var cellText = myTree.view.getCellText(row.value, col.value);
var prompts = Components.classes["@mozilla.org/embedcomp/prompt-service;1"].getService(Components.interfaces.nsIPromptService);
var errorTitle = "stopDrag";
prompts.alert(null, errorTitle, cellText);
},