drag-and-drop

Implement file dragging to the desktop from a .net winforms application?

旧街凉风 提交于 2019-12-31 10:32:33
问题 I have a list of files with their names in a listbox and their contents stored in an SQL table and want the user of my app to be able to select one or more of the filenames in the listbox and drag them to the desktop, yielding the actual files on the desktop. I can't find any documentation on how to do this. Can anyone explain or point to an explanation? Added later: I've been able to make this work by handling the DragLeave event. In it I create a file in a temporary directory with the

UICollectionView effective drag and drop

可紊 提交于 2019-12-31 08:04:31
问题 I am currently trying to implement the UITableView reordering behavior using UICollectionView. Let's call a UItableView TV and a UICollectionView CV (to clarify the following explanation) I am basically trying to reproduce the drag&drop of the TV, but I am not using the edit mode, the cell is ready to be moved as soon as the long press gesture is triggered. It works prefectly, I am using the move method of the CV, everything is fine. I update the contentOffset property of the CV to handle the

How to access the image data after dropping an image from the html-part of a webpage onto a canvas?

风格不统一 提交于 2019-12-31 04:29:25
问题 This is a follow up question to How to drop texts and images on a canvas? (Firefox 41.0.1) I simply can't find out how to access the image data of the image I dropped onto the canvas. I tried things like data = event.dataTransfer.getData("image") , but that all doesn't work. function addDragNDropToCanvas() { document.getElementById('canvas').addEventListener("dragover", function(event) { event.preventDefault();}, false); //handle the drop document.getElementById('canvas').addEventListener(

Drag, drop and resize images on Canvas

走远了吗. 提交于 2019-12-30 14:12:27
问题 I want to create a drag and drop interface in my Universal Windows App. Users will be able to drag and drop images from a ListView (or similar) to a Canvas where they can resize and move the images. I have found how to move the images, but now I can't seem to find a way to accept multitouch, find the appropriate image to resize, and resize the image itself. Is there a simple way to do this? 回答1: This is what I eventually went with: using Windows.UI.Xaml; using Windows.UI.Xaml.Controls; using

CellDoubleClick event doesnt work after addition of Drag&Drop

ε祈祈猫儿з 提交于 2019-12-30 13:54:15
问题 After I added drag & drop to a DataGridView, the CellDoubleClick event stopped working. In the CellMouseDown event I have the following code: private void dataGridView2_CellMouseDown(object sender, DataGridViewCellMouseEventArgs e) { var obj = dataGridView2.CurrentRow.DataBoundItem; DoDragDrop(obj, DragDropEffects.Link); } How do I correct this to enable CellDoubleClick event? 回答1: Yes, that cannot work. Calling DoDragDrop() turns mouse control over to the Windows D+D logic, that's going to

Nested Drag and Drop in with Angular 7 Material CDK

喜欢而已 提交于 2019-12-30 11:05:41
问题 I've got a nested tree (Not the tree component) of drag and drop lists. When dragging items around in drop lists that are contained inside of another drop list - Enter / Exit events are firing for both drop lists, meaning that when an item is dropped it could either be dropped into the inner drop list or the container drop list depending where it was dropped (Note: These lists are all linked to each other) I'm thinking at the moment that the best solution will to be suppress events firing for

How to drag and drop from one HTML5 canvas to another

删除回忆录丶 提交于 2019-12-30 10:35:09
问题 I'm trying to figure out how to drag and drop an image from one canvas to another canvas. Assuming the canvases are next to each other, would it be possible to seamlessly drag something across the border? If not, is it a better idea to drag a div over the canvas, get its ID, and place it by responding to the mouseup location on the canvas? 回答1: You don't drag items on a canvas. A canvas is a non-retained mode (or immediate mode ) graphics API. You issue draw commands and you get pixels.

QT: internal drag and drop of rows in QTableView, that changes order of rows in QTableModel

烈酒焚心 提交于 2019-12-30 10:06:08
问题 I want to perform a sort of rows in QTableView, so that the underlying TableModel would have its data sorted, too: If I'm not mistaken, built-in sorts in QTableView don't affect the order of rows in underlying TableModel, so I had to write a custom QTableView and custom QAbstractTableModel implementation of internal drag and drop. To test, if it works at all, I respond to any drag of cell by reordering first and second rows: import sys from PyQt4.QtGui import * from PyQt4.QtCore import *

Whilst using drag and drop, can I cause a Treeview to Expand the node over which the user hovers?

旧城冷巷雨未停 提交于 2019-12-30 08:04:38
问题 In brief: Is there any built-in function in .Net 2.0 to Expand TreeNode s when hovered over whilst a drag and drop operation is in progress? I'm using C# in Visual Studio 2005. In more detail: I've populated a Treeview control with a multi levelled, multinoded tree (think organisational chart or file/folder dialog) and I want to use drag and drop to move nodes within the tree. The drag drop code works well, and I can drop onto any visible node, however I would like my control to behave like

Java - visually drag a swing element

╄→гoц情女王★ 提交于 2019-12-30 07:48:22
问题 Is there a similar solution to http://allen-sauer.com/com.allen_sauer.gwt.dnd.demo.DragDropDemo/DragDropDemo.html#PaletteExample but for normal Java applications, i.e. allowing gui elements to be dragged around on a canvas? Thanks 回答1: Yes, it's possible. No it's not trivial. You'll want to become farmiluar with the code D'n'D API How to drag and drop with Java 2, Part 1 You may like to have a read through Smooth JList Drop Target Animation Smooth Tree Drop Animation My Drag Image is Better