Hello, I'm searching a solution for drag and drop widgets in a grid-layout.
http://qooxdoo.678.n2.nabble.com/how-to-move-an-item-within-a-basic-layout-td6375387.html Eric lavigne's thread was really helpfull. But I'm didn't find a way to get the collum and the row of a widget in grid-layout. My idea is to get the row and collum of the dragged element and from the element where i drop it, than i change the settings for collum and row for both elements verything would be fine... theoretically ;) http://demo.qooxdoo.org/devel/playground/#%7B%22code%22%3A%20%22var%2520container%2520%253D%2520new%2520qx.ui.container.Composite%28new%2520qx.ui.layout.Grid%2810%252C%252020%29%29.set%28%257B%250A%2520%2520decorator%253A%2520%2522main%2522%252C%250A%2520%2520backgroundColor%253A%2520%2522yellow%2522%252C%250A%2520%2520margin%253A5%252C%250A%2520%2520allowGrowX%253A%2520false%252C%250A%2520%2520allowGrowY%253A%2520false%250A%257D%29%253B%250A%250A%250Acontainer.setDroppable%28true%29%253B%250A%250Avar%2520w1%2520%253D%2520new%2520qx.ui.core.Widget%28%29.set%28%257B%250A%2520%2520decorator%253A%2520%2522main%2522%252C%250A%2520%2520backgroundColor%253A%2520%2522green%2522%250A%257D%29%253B%250A%250Acontainer.add%28w1%252C%2520%257Brow%253A%25200%252C%2520column%253A%25200%257D%29%253B%250A%250Avar%2520w2%2520%253D%2520new%2520qx.ui.core.Widget%28%29.set%28%257B%250A%2520%2520decorator%253A%2520%2522main%2522%252C%250A%2520%2520backgroundColor%253A%2520%2522blue%2522%250A%257D%29%253B%250A%2520%2520%2520%2520%250Aw2.setDraggable%28true%29%253B%250A%2520%2520%2520%2520%250Aw2.addListener%28%27dragstart%27%252Cfunction%28e%29%257B%250A%2520%2520e.addAction%28%2522move%2522%29%253B%250A%257D%29%253B%250A%250Acontainer.add%28w2%252C%2520%257Brow%253A%25202%252C%2520column%253A%25202%257D%29%253B%250A%250Acontainer.addListener%28%27drop%27%252Cfunction%28e%29%257B%250A%2520%2520alert%28%2522the%2520row%2520and%2520col%2520of%2520the%2520draged%2520element%252C%2520before%2520dragging%2522%29%253B%250A%257D%29%253B%250A%250A%2520%2520%2520%2520this.getRoot%28%29.add%28container%29%253B%22%7D Example Is this in fact the right way? A list will not fit, because i need later maybe nested widgets which have to drag and drop able. Regards Marc -- View this message in context: http://qooxdoo.678.n2.nabble.com/Grid-Drag-and-Drop-tp6379636p6379636.html Sent from the qooxdoo mailing list archive at Nabble.com. ------------------------------------------------------------------------------ What Every C/C++ and Fortran developer Should Know! Read this article and learn how Intel has extended the reach of its next-generation tools to help Windows* and Linux* C/C++ and Fortran developers boost performance applications - including clusters. http://p.sf.net/sfu/intel-dev2devmay _______________________________________________ qooxdoo-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
