drag-and-drop

difference between event.originalEvent.dataTransfer.files and event.dataTransfer.files in html 5

烈酒焚心 提交于 2020-01-01 08:32:33
问题 What is the difference between event.originalEvent.dataTransfer.files and event.dataTransfer.files ??? Because in drag and drop , second code does not work and it is undefined and i had to use first code because it works ! 回答1: jQuery does not pass the browser event object to you, it passes the jQuery event object. You can access the original untouched event object by the .originalEvent property in the jQuery event object. Then you can proceed as normal. So in code: jQuery event model: $

Moving ListBoxItem Up/Down in WPF

天涯浪子 提交于 2020-01-01 07:07:06
问题 I've created a listbox which contain filenames. I want to give user a option to move up and down file name using up/down button and using drag and drop. Anyone has an idea how to achieve this functionality. XAML Code: <ListBox Grid.Column="0" Name="listBox1" AllowDrop="True" Drop="listBox1_Drop" /> <StackPanel Grid.Column="1" HorizontalAlignment="Stretch" VerticalAlignment="Center"> <Button Name="moveUp" Content="Ç" FontFamily="Wingdings 3" Margin="3,3,3,3" Click="moveUp_Click" /> <Button

Drag and drop a file into application window using WPF and data binding

≡放荡痞女 提交于 2020-01-01 05:40:29
问题 I'd like to be able to drag and drop a file (e.g. from Desktop or Explorer) right into the main window of a WPF application. I also want no code behind, i.e. I want to use data binding. So far I tested the "gong-wpf-dragdrop" which doesn't seem to support drag targets outside the application. I could drop a file to the main window and the drag and drop events fired - but the data was empty (dragged a non-empty text file). EDIT: gong-wpf-dragdrop works (after a small fix) and the problem also

Drag and drop a file into application window using WPF and data binding

♀尐吖头ヾ 提交于 2020-01-01 05:40:02
问题 I'd like to be able to drag and drop a file (e.g. from Desktop or Explorer) right into the main window of a WPF application. I also want no code behind, i.e. I want to use data binding. So far I tested the "gong-wpf-dragdrop" which doesn't seem to support drag targets outside the application. I could drop a file to the main window and the drag and drop events fired - but the data was empty (dragged a non-empty text file). EDIT: gong-wpf-dragdrop works (after a small fix) and the problem also

Set input file element with file using HTML5 File API

时光毁灭记忆、已成空白 提交于 2020-01-01 04:43:12
问题 I am using an input file element to upload file in my JSP page. The user can upload the file by clicking on a button which opens a form with browser's browse button Now, I want to upload the file by using drag drop feature of HTML5 (as described @ html5 rocks page). I am able to extract the file name using File API. Is there a way to load the input file element with the dropped file using File API? (So that I may use the same behavior to upload file) 回答1: There's no way to set the value of a

HTML5 drag & drop behaviour

耗尽温柔 提交于 2020-01-01 04:18:10
问题 I'm making extensive use of the HTML5 native drag & drop, and it's almost entirely behaving itself, with one small exception. I'm trying to highlight my dropzones when anything is dragged over the page. I originally tried to accomplish this by putting jQuery listeners on the document body, like this: $("body").live('dragover',function(event){lightdz(event)}); $("body").live('dragexit dragleave drop',function(event){dimdz(event)}); with lightdz() and dimdz() changing the background-color style

What do various clipboard/drag-and-drop formats mean?

核能气质少年 提交于 2020-01-01 03:41:14
问题 I was playing around with drag and drop. I made a sample application and dropped a file from folder My Music onto my application. Here's what e.Data.GetFormats() returned: Shell IDList Array UsingDefaultDragImage DragImageBits DragContext DragSourceHelperFlags InShellDragLoop FileDrop FileNameW FileName IsShowingLayered DragWindow IsComputingImage DropDescription DisableDragText ComputedDragImage IsShowingText What do each of these mean and how to decode and use them? Googling each of them

download a file using windows IStream

穿精又带淫゛_ 提交于 2020-01-01 03:38:06
问题 I'm implementing dragging a virtual file out of a website and onto the desktop with an activex control. How do I create an IStream on my http url, so Windows can execute the drop? The example I'm looking at uses SHCreateStreamOnFile to copy a local file; there must be an analogous function for other types of streams like http file download. 回答1: How about using the URL Moniker Functions. You can use the URLDownloadToFile (blocking function), or URLOpenPullStream (asynchronous). 来源: https:/

Joint.js Drag and Drop Element between two papers

ぐ巨炮叔叔 提交于 2019-12-31 18:17:14
问题 I am implementing drag and drop between two papers .But I am stuck with the syncing of offset of dragged element with cursor position as I have two papers in my html body.I have very minute experience with css which may be causing problem of positioning of elements. Use Case:- User clicks on element from paper 2 and starts dragging and go to paper 1. On Pointer up a clone of that element is added to paper 1 on the position of cursor in paper 1. My strategy to handle this is :- When the user

pyside qtreewidget constrain drag and drop

那年仲夏 提交于 2019-12-31 16:02:06
问题 I'm trying to add a constraint to the QTreeWidget drag and drop function to prevent the branches from entering another branch in another root. Here's an example to make things more clear: I have 4 objects. Lets call them apple, banana, carrot, durian. The tree looks like this: isDelicious (Root) |-- BackgroundObjects (Branch) |-- Durian |-- ForgroundObjects (Branch) |-- Apple |-- Banana |-- Carrot isSmelly (Root) |-- BackgroundObjects (Branch) |-- Apple |-- Carrot |-- ForgroundObjects (Branch