drag-and-drop

Android Drag and Drop getClipData returns always null

最后都变了- 提交于 2019-12-20 20:36:35
问题 I am designing a drag and drop operation but I don't know how to access my data. Has anyone experience with Clip Data objects? Here is my code: Starting the drag and drop: ClipData dragData= ClipData.newPlainText("my", "test") ); v.startDrag(dragData, new MyDragShadowBuilder(v), v, 0); Listening on the events: case DragEvent.ACTION_DROP:{ if (event.getClipDescription().getLabel().equals("my")) Log.d("myLog","Data:"+event.getClipData()+" "+event.getClipData().getItemCount()); 回答1: not in every

Detect Drag'n'Drop file in WPF?

跟風遠走 提交于 2019-12-20 18:47:09
问题 Is it possible to have a WPF window/element detect the drag'n'dropping of a file from windows explorer in C# .Net 3.5? I've found solutions for WinForms, but none for WPF. 回答1: Unfortunately, TextBox, RichTextBox, and FlowDocument viewers always mark drag-and-drop events as handled, which prevents them from bubbling up to your handlers. You can restore drag-and-drop events being intercepted by these controls by force-handling the drag-and-drop events (use UIElement.AddHandler and set

How to paint the Dropline of a RowHeader-JTable on the Main-JTable during a DragAndDrop?

痞子三分冷 提交于 2019-12-20 18:14:13
问题 I'm using a second JTable in the Viewport of a JScrollPane to build a RowHeader for a main table. DragAndDrop on the main table is disabled. On the rowheader table DnD is enabled. If a Drag on the rowheader is started by the user, I want to extend the painted rowheader dropline (the black line in the image) over the main table (like the green line in the image). Does anybody have an advice for me? Here's the SSCCE: import java.awt.Component; import java.awt.EventQueue; import java.awt.Font;

DoDragDrop and MouseUp

泪湿孤枕 提交于 2019-12-20 17:37:00
问题 Is there an easy way to ensure that after a drag-and-drop fails to complete, the MouseUp event isn't eaten up and ignored by the framework? I have found a blog post describing one mechanism, but it involves a good deal of manual bookkeeping, including status flags, MouseMove events, manual "mouse leave" checking, etc. all of which I would rather not have to implement if it can be avoided. 回答1: I was recently wanting to put Drag and Drop functionality in my project and I hadn't come across

DoDragDrop and MouseUp

扶醉桌前 提交于 2019-12-20 17:36:26
问题 Is there an easy way to ensure that after a drag-and-drop fails to complete, the MouseUp event isn't eaten up and ignored by the framework? I have found a blog post describing one mechanism, but it involves a good deal of manual bookkeeping, including status flags, MouseMove events, manual "mouse leave" checking, etc. all of which I would rather not have to implement if it can be avoided. 回答1: I was recently wanting to put Drag and Drop functionality in my project and I hadn't come across

WPF ListView Databound Drag/Drop Auto Scroll

一世执手 提交于 2019-12-20 14:06:19
问题 I've been working with Bea's solution here for a while and finding it very helpful. Problem now I'm having is when I drag-n-drop items within or to another ListView control and I want to scroll up/down "during" the drag (moving an item from index 30 to index 1), it's not happening. I would have to drag to the top of the visual items in the ListView, manually scroll up, then drag again, eventually ending at the position I want. This isn't very user friendly. Now I found the function

Is there a way to do drag-and-drop re-ordering of the preview elements in a dropzone.js instance?

时间秒杀一切 提交于 2019-12-20 11:59:07
问题 I have a dropzone.js instance on a web page with the following options: autoProcessQueue:false uploadMultiple:true parallelUploads:20 maxFiles:20 It is programmatically instantiated, as it is part of a larger form. I have it rigged up to process the queue when the form is submitted. The goal is for my users to be able to use the dropzone to manage images for an item, so I'd like them to be able to re-order the images by dragging and dropping the dropzone.js image previews. Is there a good way

Testing drag-and-drop files onto application

强颜欢笑 提交于 2019-12-20 11:36:54
问题 I am looking for a method to perform a drag-and-drop of a file/multiple files onto my application from a unit test. For example selecting some files in Windows Explorer, drag them and drop them on my application. I am capable of testing drag-and-drop behavior between two components in my application (see below - feel free to indicate if you know a better way), but I have no idea how to do the same when the data has to come from outside my application. I thought about using the debugger to

GAC - To add an assembly to the GAC, drag and drop works, but copy and paste doesn't? Why?

情到浓时终转凉″ 提交于 2019-12-20 10:48:27
问题 I would like to know why drag and drop works, and copy paste doesn't. What is happening with a drag and drop that isn't happening with a copy and paste? 回答1: When you drag and drop your assembly into C:\windows\assembly folder, it doesn't really get copied there—a special Windows Explorer plugin callis gacutil to install your assembly into GAC. This Explorer plugin can be confusing because it may give one an illusion that GAC is just plain simple folder with lots of DLLs. Actually, it is a

Safari 5.1 broke HTML native drag and drop?

淺唱寂寞╮ 提交于 2019-12-20 09:54:05
问题 Last night, I thought I'd do a quick project to demonstrate HTML5 capabilities and to try some things out. However, I can't seem to figure out how to get drag and drop to work in Safari, while it works perfectly in Chrome and Firefox. More precisely, it seems that drop event does not fire in Safari, when you try to drag an image inside the website into the drop area. At the same time it does fire when you drag and drop a file from desktop. I'm not really sure, but I'm pretty certain that when