jferreira
8 years agoOccasional Contributor
I've had a similar problem and solved it by first clicking the destination cell, then determining the mouse position on screen and use those coordinates for the drag operation.
Something like this:
function informedTreeDrag(tree,destinationTbl,dragobject,row,col)
{
tree.ClickItem(dragobject, skNoShift);
var a = tree.get_MousePosition();
a.set_X(a.X - tree.ScreenLeft);
a.set_Y(a.Y - tree.ScreenTop);
destinationTbl.ClickCellXY(row,col,10,20,skNoShift);
var b = destinationTbl.get_MousePosition();
b.set_X(b.X - tree.ScreenLeft);
b.set_Y(b.Y - tree.ScreenTop);
tree.Drag(a.X,a.Y,b.X-a.X,b.Y-a.Y,skNoShift);
}
Related Content
- 11 years ago
- 5 years ago
- 6 years ago