drag-and-drop

ExtJS Drag and Drop in tree on modern toolkit

自古美人都是妖i 提交于 2021-02-11 08:06:59
问题 Actually I'm going to implement a tree view, where the user should have the option to reorder the structure with drag and drop. Actually I can't figure out how to enable drag and drop. I found a lot of examples using the 'treeviewdragdrop' plugin, which is just working with the classic toolkit. The following Code made me move the first node but not more. this.toParentSource = new Ext.drag.Source({ element: this.getView().element.down('.x-gridcell'), constrain: { element: this.getView().body,

Drag & Drop file from listview to windows explorer?

早过忘川 提交于 2021-02-11 02:48:50
问题 I have a bunch of files listed within a listview, and I want to know is it possible to drag and drop the files to Windows Explorer? If so how? I only seem to find examples of the other way around. Thanks! 回答1: So here's what I did. First off, in your listview, create an event handler for ItemDrag. Then the following.. private void listView_ItemDrag(object sender, ItemDragEventArgs e) { List<string> selection = new List<string>(); foreach (ListViewItem item in listView.SelectedItems) { int

Drag items between QTreeWidget and QListWidget in PyQt5?

大憨熊 提交于 2021-02-10 07:13:23
问题 I have a QListWidget and a QTreeWidget and I want to be able to drag one or multiple list items around within each one as well as between them. I have the internal drag and drop working, but I'm not sure how to drag between them. When I print event.mimeData().formats() in my code below it says ['application/x-qabstractitemmodeldatalist'] . I am stuck on how to extract the text and index of that item (it should be a QListWidgetItem or QTreeWidgetItem, right?) so I can delete the original from

Drag items between QTreeWidget and QListWidget in PyQt5?

拈花ヽ惹草 提交于 2021-02-10 07:09:20
问题 I have a QListWidget and a QTreeWidget and I want to be able to drag one or multiple list items around within each one as well as between them. I have the internal drag and drop working, but I'm not sure how to drag between them. When I print event.mimeData().formats() in my code below it says ['application/x-qabstractitemmodeldatalist'] . I am stuck on how to extract the text and index of that item (it should be a QListWidgetItem or QTreeWidgetItem, right?) so I can delete the original from

Drag and Drop a div from the inside of another div

本秂侑毒 提交于 2021-02-08 11:11:00
问题 I'm trying the drag and drop function of jQuery UI but how can I drag a div1 inside a div2 and drop in div3 like this. My currrent code is like this css: #div2 { height: 52em !important; min-height: 50em; overflow:hidden; } script: $( function() { $('#div1').draggable({ containment: '#div4' }); $('#div3').droppable(); }); My code doesn't seem able to drag the div1 to div3 回答1: If you're wanting the actual DOM element to be moved into the new one you can do something like this (I'm not sure if

WinForms DragDrop path length limitation

久未见 提交于 2021-02-08 10:12:44
问题 I'm using WinForms and have a DragDrop operation that handles a file being dragged onto the window. This works fine but if the path to the file is very long it just fails. string[] fileList = (string[]) e.Data.GetData(DataFormats.FileDrop, false); results in fileList being null . Does anyone know what the limitation is or any way to work around it? Thanks! Update: The data in GetFormats is as follows: Short Filename: Shell IDList Array UsingDefaultDragImage DragImageBits DragContext

WinForms DragDrop path length limitation

↘锁芯ラ 提交于 2021-02-08 10:04:53
问题 I'm using WinForms and have a DragDrop operation that handles a file being dragged onto the window. This works fine but if the path to the file is very long it just fails. string[] fileList = (string[]) e.Data.GetData(DataFormats.FileDrop, false); results in fileList being null . Does anyone know what the limitation is or any way to work around it? Thanks! Update: The data in GetFormats is as follows: Short Filename: Shell IDList Array UsingDefaultDragImage DragImageBits DragContext

WinForms DragDrop path length limitation

感情迁移 提交于 2021-02-08 10:04:20
问题 I'm using WinForms and have a DragDrop operation that handles a file being dragged onto the window. This works fine but if the path to the file is very long it just fails. string[] fileList = (string[]) e.Data.GetData(DataFormats.FileDrop, false); results in fileList being null . Does anyone know what the limitation is or any way to work around it? Thanks! Update: The data in GetFormats is as follows: Short Filename: Shell IDList Array UsingDefaultDragImage DragImageBits DragContext

drag and drop zone with child nodes

喜你入骨 提交于 2021-02-08 09:22:22
问题 I have a drag and drop zone with multiple child nodes. The main element has dropenter and dropleave events. But if you drag a file inside the main element and over a child node, the dropleave is triggered. How to handle it so the dropleave only is called when the dragged element and mouse is outside the main element? http://jsfiddle.net/4cspcsc4/ <div class="drop"> Drop here <div class="img"></div> </div> $('.drop').on('dragenter', function(e){ $(this).addClass('highlight'); }) .on('dragleave

Angular Material Drag and Drop multi row list

北慕城南 提交于 2021-02-08 08:57:34
问题 I have a list of items which I need do order. To do so, I'd like to drag and drop. I'm using Angular Materials list solution, but my list waps to a new line (flex-wrap) When I have multiple rows, it doesn't put the items in where they sholud be. Heres an example; https://stackblitz.com/edit/angular-dnd-list-multirow Does anyone know how to make this work? Thanks. 回答1: The problem if you use an unique cdkDropList is that when you drag all the items reorder. I suggest an aproximation that