Another related question. I have a QxListView and a QxTree. I want to
both drag and drop tree items into tree items and QxListView rows into
tree items. If I drag rows into tree nodes, a context menu shows up in
which you can select between "copy" and "move": Here is my dragDrop
event code:
/**
* handler for drop: move folders or references
**/
bg_folders_root.handleDragDrop = function(e)
{
e.stopPropagation();
treeMarkerLine.setStyleProperty("display", "none");
var vType = e.getDropDataTypes()[0];
var vSource = e.getData(vType);
var vTarget = e.getCurrentTarget();
if ( vSource instanceof QxTreeFolder ){
// move folder
bg_folders_root._callbackFunc = function (vAction) {
bg_folders_root.moveFolder ( vAction, vSource, vTarget, e );
}
} else {
// move references
var vSource = e.getData("QxListView");
var vRows = e.getData("QxListViewEntries");
bg_folders_root._callbackFunc = function (vAction) {
vSource.getPane().getManager().deselectAll();
bg_folders_root.moveReferences ( vAction, vSource, vRows,
vTarget);
}
}
var menu = bg_folders_context_menu_paste;
menu.set({top:e.getScreenY()-150,left:e.getScreenX()-30});
menu.show();
};
The code might strike you as familiar, I just used the example code from
the demo folder.
1) Why do I have to substract 150-some px from e.getScreenY() and
30-some px from e.getScreenX() to position the context menu correctly?
It should show up where the cursor is.
2) I still need to know how to cancel the multiple selection mode in the
source pane. vSource.getPane().getManager().deselectAll() doesn't do the
trick
3) Has anyone developed the demo example further to allow positioned
inserts? the treeMarkerLine only appears at the root level for me. I
would like to be able to position folders between other folders, not
just add them at the bottom of the parent folder's children.
Other than that: I was surprised how easy and painless drag and drop
within the tree was. Once again: Cheers to the Qooxdoo developers!
Thanks,
Christian
Christian Boulanger schrieb:
Hi,
I have a QxListViewPane from which I drag and drop items to a
QxTreeView. When I drag a single item to the tree and return with the
mouse to the pane, it be in "multiple selection mode", that is, it
will mark all rows that are hovered over with the mouse. How can I
stop this behaviour? It must be some issue with the selection manager.
Thanks,
Christian
-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job
easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache
Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel