drag-and-drop

.NET - UserControl Drag & Drop - Child Controls

邮差的信 提交于 2019-12-10 18:14:15
问题 I have FlowLayoutPanel and UserControl's on it with drag & drop reordering. This sort of works. But the problem is that child controls prevent dragging of the actual parent UserControl. So my question is how to enable dragging of a UserControl that contains child controls? 回答1: If I understand you right I had the same problem as you and I solved it by propagating events of the child element to it's parent. If you have a draggable UserControl containing a label. You have to call the events of

Drag and Drop from JTable to JLayeredPane

倾然丶 夕夏残阳落幕 提交于 2019-12-10 18:06:57
问题 How to create Drag and drop between JTable and JLayeredPane . Does anyone have any ideas how to implement this? I need transfer object by Drag and drop between JTable and JLayeredPane . 回答1: You have to do a few things at minimum to get this to work: Call setDragEnabled(true) on your JTable instance Set the JTable s and JLayeredPane s DropTarget Create a draggable Component to add to the JLayeredPane To set a Component s DropTarget , call the setDropTarget(DropTarget d) method and pass an

Dragging selected Item along with the mouse in WPF

扶醉桌前 提交于 2019-12-10 18:04:02
问题 I am using the following code for performing Drag & Drop in my StackPanel Childran, XAML <Window x:Class="WpfApplication1.Window1" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="Window1" Height="601" Width="637"> <StackPanel Name="sp" AllowDrop="True" Background="SkyBlue" PreviewMouseLeftButtonDown="sp_PreviewMouseLeftButtonDown" PreviewMouseLeftButtonUp="sp_PreviewMouseLeftButtonUp" PreviewMouseMove="sp

Drag and drop an item from one recyclerview (listview) into another recyclerview (listview)

吃可爱长大的小学妹 提交于 2019-12-10 17:35:08
问题 I have a requirement that need to drag an item from one recyclerview into another recyclerview. I found some some of the useful resource as with the help of ItemTouchHelper Also find a library to drag and drop in android here. While implementation, am able to drag the item view along with the pointer(finger) on the screen, but not able success to achieve my requirement. Please share me if you have any previous experience on this. 回答1: For multiple list view drag and drop you can refer this

HTML5 Drag & Drop change cursor while dragging (don't use UI)

安稳与你 提交于 2019-12-10 17:20:18
问题 I want to change the cursor when dragging, so I try this way: function drag (event) { localStorage.setItem("no", $(event.target).data("no")); $("html").css("cursor", "move"); } <tr draggable="true" class="memo_item move" id="memo_<?php echo $memo->memo_no?>" ondragstart="drag(event, this);" data-no="<?php echo $memo->memo_no?>"></tr> but it doesn't work. And I can't use JQueryUi . How can I change cursor? 回答1: Simply implement this kind of event setup in your code... $('<some element here>')

Show text cursor on drag and drop in UITextView

人盡茶涼 提交于 2019-12-10 17:06:06
问题 I'm implementing drag and drop in my app. One of the main screens where drag and drop will be applied (mostly drop) is in a UITextView . I've added a drop interaction to this UITextView with the following code: let dropInteraction = UIDropInteraction(delegate: self) inputTextView.addInteraction(dropInteraction) By doing so I now accept drops in it. In order to accept only images and text as drop I've implemented the following delegate method: func dropInteraction(_ interaction:

C# drag-drop problem

南楼画角 提交于 2019-12-10 16:47:20
问题 I have a C# .NET 3.5 application that allows drag items from a tree and drop them to a folder as a file. Here is my code String absolutePathToFile=...get absolute path DataObject dataObject = new DataObject(); StringCollection paths = new StringCollection(); paths.Add(absolutePathToFile); dataObject.SetFileDropList(paths); DoDragDrop(dataObject, DragDropEffects.Copy); This works quite well except when interacts with another C# application that accepts files via drag and drop, Another C#

Drag Drop CDK: keep showing dragged element inside starting list

↘锁芯ラ 提交于 2019-12-10 16:37:24
问题 I'm playing with cdk Drag and Drop cause I need it to create a POC for work. I started with this code from the documentation website. I saw that every time I drag an element outside its list, said element is hidden until I drop it in the same list or in another one. So tell me if I'm wrong, but it seems that the dragged element is not a copy of the list item, but instead it's the element itself. In conclusion I want the list to not change its layout while I'm dragging one of its elements.

Is there a way to rotate an html table?

跟風遠走 提交于 2019-12-10 16:34:39
问题 Is there a way to rotate an html table? So, say I had a table like this: <table id="table-1" cellspacing="0" cellpadding="2"> <tr><td>1</td></tr> <tr><td>2</td></tr> <tr><td>3</td></tr> <tr><td>4</td></tr> <tr><td>5</td></tr> <tr><td>6</td></tr> </table> and wanted to some sort of button that had javascript behind it that could rotate the table any which direction. For example, clicking the right button, results in: <table id="table-1" cellspacing="0" cellpadding="2"> <tr><td>6</td><td>5</td>

How can you detect that a user dragged a folder (not a file) into their browser?

萝らか妹 提交于 2019-12-10 16:33:07
问题 I know very well that you are not allowed to upload a whole folder via drag and drop. The problem is, how can I tell if someone tries to do it? If you drag a folder into the browser, it behaves exactly as if you dragged a file with some extension webkit doesn't know about, like '.sh'. How can you tell the difference? I have tested this in Chrome and Safari and Firefox on Mac OS X and Windows. Depending on the browser and OS, I get slightly different results. Sometimes it succeeds in uploading