Hi all,
I've tested a little bit and now I found a workaround for me.
I added the event listener for 'dragstart' to the table again.
this.table.setDropDataTypes(["test.dragdrop"]);
this.table.addEventListener("dragstart", this.handleDrag, this);
this.table.addEventListener("dragdrop", this.handleDrop, this);
In 'handleDrag' I've checked, if the target is an instance of
'qx.ui.table.pane.Pane' (unselected rows) or whether the target is an
instance of 'qx.ui.layout.HorizontalBoxLayout' (selected row?)
if( e.getTarget() instanceof qx.ui.table.pane.Pane ||
e.getTarget() instanceof qx.ui.layout.HorizontalBoxLayout)
{
...
e.startDrag();
I don't know if that's the appropriate method (because the sample of
listview dragging works on the pane), but that works for me.
Feel free to comment, because I'm interested on a better solution :-)
Ulrich
Ulrich Möllmann schrieb:
> Hi,
>
> I built up a window tiled by a vertical splitpane ("1*","1*").
> On each pane I place a table (width an height "100%"). The two tables
> bases on the same class and differs only on the row data.
>
> So I tried to implement drag and drop for this tables. This should work
> in both directions.
>
> I am starting with drag and drop on the table.
>
> this.table.setDropDataTypes(["test.dragdrop"]);
> this.table.addEventListener("dragstart", this.handleDrag, this);
> this.table.addEventListener("dragdrop", this.handleDrop, this);
>
> That works, but the drag also starts on header and scroller.
> So I tried to implement dragstart on the tablepane and dragstop on the
> table.
>
> var tablepanescroller = this.table.getPaneScroller(0);
> var tablepane = tablepanescroller.getTablePane();
> tablepane.addEventListener("dragstart", this.handleDrag, this);
>
> this.table.setDropDataTypes(["test.dragdrop"]);
> this.table.addEventListener("dragdrop", this.handleDrop, this);
>
> This looks good, but the problem is that I can't drag from a selected
> entry. The dragstart event doesn't appear in this case (pane).
>
> Has anyone solved such behavior?
>
>
> Thanks Ulrich
>
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel