drag-and-drop

Collection view drag and drop delay

风格不统一 提交于 2019-12-08 06:30:06
问题 Is there a way to adjust time which takes for drag to begin on collection view cell? Similar to UILongPressGestureRecognizer minimumPressDuration property. I know we can iterate over all gesture recognizers attached to the view and probably find the one we need. But this approach doesn't feel reliable. 回答1: Since there's no better solution, i still used 'iterate over gesture recognizers' approach. Code is the following: gestureRecognizers?.forEach { (recognizer) in if let longPressRecognizer

Prevent nodes to be dropped on nodes of certain type in Primefaces tree

余生长醉 提交于 2019-12-08 06:19:25
问题 I have a tree and my code is: <p:tree id="tree_newCms_pl" value="#..............." var="item" animate="true" selectionMode="single" selection=".............." dynamic="true" draggable="true" droppable="true"> I only want to allow to change the position of a node, and prevent it from being dropped onto a different parent. How can I fix this? 回答1: I've resolved a similar issue by doing the following. In the backing bean checking the type of the drop TreeNode in the event, and only updating the

Drag and drop with the help of jQuery

时光总嘲笑我的痴心妄想 提交于 2019-12-08 06:19:08
问题 I'd like to be able to move an object into another with the function draggable of jQuery. I can move an object in the container and able to move in it. But when I try to add helper to objects to move, this no longer works. I want that when I select an item to deposit it in my container, it duplicates itself. Below is what I have managed to do for the moment: JSFiddle $(".drag").draggable({ opacity: 0.7, snap: '#drop', cursor: "move", revert: "invalid", //helper: "clone" }); $("#drop")

Android / Java - Add textView to Drag-Drop GridView Tutorial / Example

£可爱£侵袭症+ 提交于 2019-12-08 05:36:11
问题 I've create a project based on a few classes from the following tutorial: http://blahti.wordpress.com/2012/03/03/improved-drag-drop-for-gridview/ Now I'm attempting to modify the example to be able to drag and drop not only an image - but an image and a textView at the same time. How can this be accomplished? I've instantiated the textView already: tx = (TextView) findViewById(R.id.textView1); Now I believe I'll need to modify the tutorial's acceptDrop method (in it's DropTarget class) but I

Android / Java - Add textView to Drag-Drop GridView Tutorial / Example

流过昼夜 提交于 2019-12-08 05:24:27
I've create a project based on a few classes from the following tutorial: http://blahti.wordpress.com/2012/03/03/improved-drag-drop-for-gridview/ Now I'm attempting to modify the example to be able to drag and drop not only an image - but an image and a textView at the same time. How can this be accomplished? I've instantiated the textView already: tx = (TextView) findViewById(R.id.textView1); Now I believe I'll need to modify the tutorial's acceptDrop method (in it's DropTarget class) but I'm not 100% sure how to do so. The bottom line: I simply need a bit of figuring out how to add a

Implementing drag and drop with QT 4.5 using QT Creator environment

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-08 05:18:59
问题 We're about to commit to Qt and C++ (sigh) to do some cross-platform development. The latest version of Qt 4.5 seems very nice as does the QT Creator IDE, which although simple compared to other IDEs, is a good way to get started. I'm trying to understand how to do drag and drop into QT widgets from the "outside" world. As far as I can tell from the documentation, you're supposed to subclass a widget that you want to have respond to drop events and override some methods (the dragEnterEvent

How can I have an element with “overflow-y: auto” but still allow the browser to scroll when i drag an item horizontally using jquery ui sortable?

你。 提交于 2019-12-08 05:06:32
I have a webpage that uses jquery ui sortable. I have a list of of columns where each column has an html table in it. I am using jquery ui sortable to support dragging table rows within a table as well as from one table to another similar to this jquery ui sortable demo (but with many more columns) The one issue i ran into is that if i have many columns, I can't seem to support both of these requirements below at the same time: The requirement to have vertical scrollbar in my table if it exceeds a certain size to avoid a overall page vertical scroll bar For "wide" pages with many lists I do

How to I prevent 'self' drag and drop in a datagridview?

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-08 04:58:46
问题 I'm implementing drag and drop functionality between two datagridviews. This works as intended with one exception: it is possible to drag and drop within the same datagridview. This results in duplicated rows. I want to limit the functionality so that I can only drag from one datagridview to another. Does anyone know how this can be achieved? I'm guessing some kind of hit test is required but I'm not sure how to implement this... The code I am using is as follows: Private Sub dgvFMAvailable

Drag window handle for Tkinter?

余生长醉 提交于 2019-12-08 04:43:17
问题 First of all, this is my current code, essential parts of it: class WindowDraggable(): x = 1 y = 1 def __init__(self,label): label.bind('<ButtonPress-1>',self.StartMove); label.bind('<ButtonRelease-1>',self.StopMove); label.bind('<B1-Motion>',self.OnMotion); def StartMove(self,event): self.x = event.x self.y = event.y def StopMove(self,event): self.x = None self.y = None def OnMotion(self,event): deltaX = event.x - self.x deltaY = event.y - self.y self.x = root.winfo_x() + deltaX self.y =

Custom object drag-and-drop from FX to Swing

一曲冷凌霜 提交于 2019-12-08 04:12:02
问题 I'm working on a JavaFX application that should interact with an existing Swing application via drag-and-drop. The data exchange via drag-and-drop actually works, but we want to rework that part of the functionality to actually exchange custom Java objects instead of simple Strings with objects serialized to JSON. The problem is, that the Swing UI does not receive the dragged data, if custom MIME types are used instead of e.g. text/plain . Below you can find a minimal example for both the