drag-and-drop

iOS 11 dropInteraction performDrop for files

和自甴很熟 提交于 2019-12-29 06:45:08
问题 How can I use dropInteraction(_ interaction: UIDropInteraction, performDrop session: UIDropSession) to accept other type of files than images? Say for instnce that I drag a PDF or MP3 from the files app. How can I accept this file and get the data? I thought I could use NSURL.self, but that only seems to work for URL's dragged from Safari och a textview. 回答1: An example for PDF ( com.adobe.pdf UTI) implementing NSItemProviderReading could be something like this: class PDFDocument: NSObject,

How to drag and drop multiple elements between different tabs

£可爱£侵袭症+ 提交于 2019-12-28 19:22:12
问题 I am trying to drag and drop multiple elements between different tabs. in this jsfiddle, When an item is being dragged, i want to drag all other checked items along with it, like Gmail does when you move several email from inbox to another folder. I think it is necessary to use ui.helper but i don't have enough skill in query. following is the code i'm currently working with: $( "#sortable1, #sortable2" ).sortable().disableSelection(); var $tabs = $( "#tabs" ).tabs(); var $tab_items = $( "ul

How to drag and drop multiple elements between different tabs

那年仲夏 提交于 2019-12-28 19:22:10
问题 I am trying to drag and drop multiple elements between different tabs. in this jsfiddle, When an item is being dragged, i want to drag all other checked items along with it, like Gmail does when you move several email from inbox to another folder. I think it is necessary to use ui.helper but i don't have enough skill in query. following is the code i'm currently working with: $( "#sortable1, #sortable2" ).sortable().disableSelection(); var $tabs = $( "#tabs" ).tabs(); var $tab_items = $( "ul

Drag and Drop between Instances of the same Windows Forms Application

不想你离开。 提交于 2019-12-28 10:06:20
问题 I have created a small Windows Forms test application to try out some drag/drop code. The form consists of three PictureBoxes. My intention was to grab a picture from one PictureBox, display it as a custom cursor during the drag operation, then drop it on another PictureBox target. This works fine from one PictureBox to another as long as they are on the same form . If I open two instances of the same application and attempt to drag/drop between them, I get the following cryptic error: This

How do I drag and drop a row in a JTable?

依然范特西╮ 提交于 2019-12-28 08:39:49
问题 How do you setup a JTable to be able to drag a row to a different index in the table. For example if I have 5 rows and I want to drag the 4th row to the 2nd position? 回答1: Check out the drag and drop section of the Java Tutorial. There are some examples on how to implement this for JTable . 回答2: The following allows JTable re-ordering of a single dragged row: table.setDragEnabled(true); table.setDropMode(DropMode.INSERT_ROWS); table.setTransferHandler(new TableRowTransferHandler(table)); Your

How do I drag and drop a row in a JTable?

爷,独闯天下 提交于 2019-12-28 08:38:11
问题 How do you setup a JTable to be able to drag a row to a different index in the table. For example if I have 5 rows and I want to drag the 4th row to the 2nd position? 回答1: Check out the drag and drop section of the Java Tutorial. There are some examples on how to implement this for JTable . 回答2: The following allows JTable re-ordering of a single dragged row: table.setDragEnabled(true); table.setDropMode(DropMode.INSERT_ROWS); table.setTransferHandler(new TableRowTransferHandler(table)); Your

UIControlEventTouchDragExit triggers when 100 pixels away from UIButton

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-28 03:50:10
问题 At present, the UIControlEventTouchDragExit only triggers when I drag 100 pixels away from the button. I'd like to customize this behavior and bring that range in to around 25 pixels, but I'm relatively new to programming and have never needed to override / customize an in-built method like this. I've read in some other posts here that I'd need to subclass the UIButton (or perhaps even UIControl ?), and override -(BOOL) beginTrackingWithTouch: (UITouch *) touch withEvent: (UIEvent *) event

jQuery drag and drop - how to get at element being dragged

孤街浪徒 提交于 2019-12-28 03:40:07
问题 I am using the jQuery library to implement drag and drop. How do I get at the element that is being dragged when it is dropped? I want to get the id of the image inside the div. The following element is dragged: <div class="block"> <asp:Image ID="Image9" AlternateText="10/12/2008 - Retina" Width=81 Height=84 ImageUrl="~/uploads/ImageModifier/retina.jpg" runat=server /> </div> I have the standard dropped function from their example: $(".drop").droppable({ accept: ".block", activeClass:

The items in listBox do not want to be dragged out [duplicate]

穿精又带淫゛_ 提交于 2019-12-25 19:04:22
问题 This question already exists : Closed 8 years ago . Possible Duplicate: How to make drag-and-drop from one list to another in C#/WindowsForms? I am trying to make 2 listBoxes (with use of WinForms) with ability to drag and drop form one to another but even after setting up the property 'AllowDrop' of the listBoxes to True, the items from one listBox do not want to be dragged out of it - the cursor does not change and none of the DragLeave, DragDrop etc. methods are being called. Am I missing

how defined target for drag and drop image

十年热恋 提交于 2019-12-25 18:34:32
问题 in my program i 4 imageview, imageview1 and imageview2 should drag and drop to imageview3 and imageview4 imageview1 should drop only in imageview3 and if droped another place should back to original place and imageview2 should drop only in imageview4 and if droped another place should back to original place i write code and i dont know how defined the target of imageview1 and imageview2 and say if drope place exept this target back to original place package com.test.dragplease; import android