drag-and-drop

Set custom anchor when dragging a View

给你一囗甜甜゛ 提交于 2019-12-18 16:49:12
问题 I am using Android Drag&Drop API and am trying to set the anchor of the drag shadow to the point where the touch was made in the View . The dafault behavior is to have the anchor the middle of the View . I did some research and it seems this can be done by overriding the onProvideShadowMetrics (Point shadowSize, Point shadowTouchPoint) method in the DragShadowBuilder class. From what I understood, if I change the x,y coordinates of shadowTouchPoint it should modify the coordinates of the drag

How make Drag and Drop interface? [duplicate]

匆匆过客 提交于 2019-12-18 13:52:08
问题 This question already has answers here : Drag and Drop widgets tkinter (2 answers) Closed 2 years ago . Currently, I am working with Python 3.5 GUI development using tkinter module. I want to be able to drag an image from one place to another within the application. Does tkinter support drag and drop within an application, and if so, how do you do it? The question Drag and Drop in Tkinter? is asking about dragging and dropping between applications, which is not what I'm asking here. from

Drag and drop images in gridview in android

强颜欢笑 提交于 2019-12-18 13:49:26
问题 I'am developing a sample android application to learn about drag & drop in android. On start of the app, i'am displaying few images on a grid view. Now i need to drag one image at a time over to the place of another. After dropping an image over another, the images should swap its places. How can i achieve it ? Please guide/help me. 回答1: You can easily achieve this by using thquinn's DraggableGridView You can add your custom layout public class DraggableGridViewSampleActivity extends Activity

WPF Drag and Drop with Adorner using mouse and touch

一世执手 提交于 2019-12-18 13:36:50
问题 I want this to be good question, so I'll write in details what I would like to achieve, what I've found on the internet and I show what I've done so far and what I've tried. I need to add drag and drop functionality to my application. I have Images (basically controls) that I want to drag to items of listbox. Here is sample UI: And here is usage I have now: As You can see I'm able to drag one of four images and drop it over listbox item. If I move image over correct target (listbox image)

jquery drag and rotate to angle

╄→尐↘猪︶ㄣ 提交于 2019-12-18 13:28:12
问题 I am using jQuery UI to drag and drop an image. I also want to rotate the image 360 degrees so I can move and rotate it like in Photoshop. I am using the jQuery rotate plugin to rotate the image on click, but I want to select a corner and drag to rotate the image to any angle. Live JS: http://jsfiddle.net/87jaR/ JavaScript code: var test = 5; $(function() { $('#rotate').draggable({ containment: 'frame' }); $('#frame img').live('mousedown', function(event) { test = test + 15; $(this).rotate({

drag and drop cell from datagridview to another

旧城冷巷雨未停 提交于 2019-12-18 13:14:23
问题 I have 2 datagridviews and i want to copy cells from the datagridview1 to datagridview2 (a cell at a time).I´m able to select the cell I want and drag it to the datagridview2 but the value is not showing... I spent most of the night looking for a solution...Probably is a simple answer or I just need to sleep , but please help.... I have the following code private void dataGridView1_MouseDown(object sender, MouseEventArgs e) { if (e.Button == MouseButtons.Left) { DataGridView.HitTestInfo info

how to drag and drop a image onto a image

限于喜欢 提交于 2019-12-18 12:42:05
问题 hello and merry Christmas to everyone for tomorrow(UK), I'm rather new to android but have successfully managed a few bits and pieces what im trying to achieve right now is a simple drag and drop activity that allows the user to drag and drop a shape ImageView onto another ImageView, if the image matches then it should replace the image it overlapped, and if it doesnt it should snap back to where it was, i know this means creating an if/else block in my drop event but after thumbing few many

Dragging QDockWidgets between QMainWindows

萝らか妹 提交于 2019-12-18 12:33:14
问题 I have a question regarding dragging QDockWidgets between QMainWindows. I have an application with different "DockAreas" which have a QMainWindow member with one or more QDockWidgets. Additionally, I want to make QDockWidgets drag-and-droppable into other, already floating QDockWidgets (not tabbed!). To have the nice hover-effect upon drag-and-drop, the floating QDockWidgets are embedded in a new instance of my DockArea with the QMainWindow member. Now I intercept the mousemove event of the

How do you drag and drop a file from Explorer Shell into a VirtualTreeView control in a Delphi application?

拟墨画扇 提交于 2019-12-18 12:32:37
问题 There is extensive drag and drop support in VirtualTreeView by Mike Lischke, and I am using TVirtualStringTree, which has some on-drag-and-drop events, but I can not figure out how to get it to accept a shell drag-and-drop of some files from the windows explorer shell, into my application. I want to load the files, when they are dragged onto the drop control. I tried using a third-party set of code from Anders Melander, to handle drag and drop, but because VirtualTreeView already registers

Drag and drop images in android

和自甴很熟 提交于 2019-12-18 12:32:33
问题 I m working on a word scramble game which allows user to move the image to image..if the image doesn't match then it should come back to it's original position from where it was dragged.I have written a sample code to move the image but the problem here is if I move one image the neighbouring image also starts moving.. Here is the sample code. /** Touchmoveimage.java*/ package com.examples.Touchmoveimage; import android.app.Activity; import android.content.Intent; import android.os.Bundle;