How is it possible to confine a selection to a single row?

Most of the code is inspired/copied from the demo virtual > Gallery.
Right now I have:
new qx.ui.virtual.selection.CellRectangle(scroller.getPane(), this).set({
         mode: "multi",
         drag: true
         });

Which works well. However, I'd like to confine the selection to the row 
that the selection(drag) was started on. So in other words, one should 
not be able to select vertically. I had an idea to use the 
isItemSelectable method and store the first cell that was clicked on, 
and then use that as a reference to restrict further horizontal 
selection, but I don't know if that is the best way to do it.

Perhaps something like:

         isItemSelectable : function(item)
         {
             if (item.row == this.startSelectionRow) return 
!!this.items[item.row][item.column];
             else return false;
         }

Any ideas and tips are much appreciated.

Thanks,

Simon

PS The code so far is here:
http://pastebin.com/wYZrHJci

-- 
simonsmicrophone.com

------------------------------------------------------------------------------
For Developers, A Lot Can Happen In A Second.
Boundary is the first to Know...and Tell You.
Monitor Your Applications in Ultra-Fine Resolution. Try it FREE!
http://p.sf.net/sfu/Boundary-d2dvs2
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to