i will do like putting event listener to every cell in the QxGridLayout widget
Thank you
Daniel
On 2/7/06, Sebastian Werner <[EMAIL PROTECTED]> wrote:
Daniel Dumitrescu schrieb:
> Hello guys.
>
> I'm facing a new problem while trying to handle the "drag & drop" events.
> I have a QxGridLayout which has 6 rows and 6 columns, each cell
> containing a QxVerticalBoxLayout-derived class.
> I want to implement a drag & drop mechanism between a QxList and this
> QxGridLayout object, so i coded the following:
>
> myList.addEventListener (QxConst.EVENT_TYPE_DRAGSTART, function(e) {
> var obj = e.getCurrentTarget().getManager().getSelectedItems();
>
> e.addData("QxListItem", obj);
> e.addAction("copy");
> e.startDrag();
> });
> ....
> myGrid.setDropDataTypes(["QMarketListItem"]);
> myGrid.addEventListener(QxConst.EVENT_TYPE_DRAGDROP, function(e) {
> var type = e.getDropDataTypes()[0];
> this.debug("Type: " +type);
> this.debug("Event class: " + e);
> var obj = e.getData(type);
> this.debug("received: " + obj);
> this.debug("on : " + e.getCurrentTarget());
> });
>
> and when i debug e.getCurrentTarget() it writes "QxGridLayout" and i
> need to know what cell from this QxGridLayout receives the "drop" event.
The "drop" event on receive widgets which are drag and drop enabled
(have drop data types).
>
> Can you help me with another solution except to put to all 36 cells an
> event listener for "dragdrop" event?
This should be the way to go, IMHO.
Otherwise you can try to work with event coordinates and such stuff. But
it's IMHO much easier to add listeners to each cell.
Sebastian
>
> Thank you kindly
>
> Daniel
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
Qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
