drag-and-drop

drag and drop between two fragments?

ⅰ亾dé卋堺 提交于 2019-12-18 03:36:06
问题 I have a particular requirement where i need to drag a element in one screen then another fragment becomes visible where i can drop the dragged view . what is the best way to achieve this ? I am not sure how to achieve this behavior between two fragments .Thanks in advance! 回答1: THE basics we need to understand is these constants for drag and drop both applicable for activity and fragments DragEvent.ACTION_DRAG_STARTED DragEvent.ACTION_DRAG_ENTERED DragEvent.ACTION_DRAG_EXITED DragEvent

Drag and drop for linearlayout's child views

泄露秘密 提交于 2019-12-18 02:59:43
问题 I have layout with 5 different child views, Child views are relativelayout with number of child views inside it, and all are different too. Hence i am using scrollview as root container like this: <ScrollView android:layout_width="match_parent" android:layout_height="match_parent" android:fillViewport="true" android:scrollbars="none"> <LinearLayout android:layout_width="match_parent" android:layout_height="match_parent" android:id="@+id/home_page_scrollview_outer_layout"> <RelativeLayout

Drag-n-Drop on contentEditable elements

扶醉桌前 提交于 2019-12-18 02:29:25
问题 There are numerous WYSIWYG editors available on the internet, but I'm yet to find one that implements some form of drag-n-drop implementation. It is easy to create one's own editor, but I want to the user to be able to drag elements (ie. tokens) from outside the editable area and have them drop it at a location of their choice inside the editable area. It is easy to inject html at a specific location of an editable element, but how do one determine where the caret should be when the user is

Drag-n-Drop on contentEditable elements

ε祈祈猫儿з 提交于 2019-12-18 02:29:08
问题 There are numerous WYSIWYG editors available on the internet, but I'm yet to find one that implements some form of drag-n-drop implementation. It is easy to create one's own editor, but I want to the user to be able to drag elements (ie. tokens) from outside the editable area and have them drop it at a location of their choice inside the editable area. It is easy to inject html at a specific location of an editable element, but how do one determine where the caret should be when the user is

NSTableView and drag and drop from Finder

一曲冷凌霜 提交于 2019-12-17 23:09:06
问题 I'm trying to implement drag and drop from the Finder into an NSTableView of my app. The setup uses an NSTableView , an array controller which acts as a datasource using Cocoa bindings to a Core Data store. I did the following, basically following various blog posts I found on SO and other sites: In the awakeFromNib of my view controller I call: [[self sourcesTableView] registerForDraggedTypes:[NSArray arrayWithObjects: NSPasteboardTypePNG, nil]]; I subclassed NSArrayController and added the

Implementing drag-drop from Chrome on my .NET Windows form

会有一股神秘感。 提交于 2019-12-17 23:07:28
问题 Google Chrome has a handy feature where I can click a download link and drag it into a Windows Explorer window, and then drop. After dropping, Chrome then downloads the file and it appears where I dropped it. I would like to be able to drop from Google Chrome into my application, but it seems it isn't so simple. I have a DataGridView called gridFiles, and the following code: Private Sub gridFiles_DragDrop(ByVal sender As Object, ByVal e As System.Windows.Forms.DragEventArgs) Handles gridFiles

WPF drag and drop to DataGrid

偶尔善良 提交于 2019-12-17 22:35:40
问题 I have been searching the internet high and low but can't find some examples that can help me. I'm developing an application in wpf, in it I use a DataGrid ; each cell has a DataTemplate with and image, in a mosaic style; on the side of the grid I have some tiles to use on the grid. I'm able to drag the tiles but can't drop them on the grid because I can't find the cell to which make the drop. Is there a way to get a cell position from the the drag events? Thanks 回答1: Take a look at these:

How to drag an image from one panel to other [closed]

萝らか妹 提交于 2019-12-17 22:28:46
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 6 years ago . I had created a frame and then panels in it. I had placed an image in one panel, now I need to drag that image to another panel. How could I do that. Please explain step by step as am a beginner. 回答1: Quick example using pure java, DragGestureListener , DropTargetAdapter and

PlayFramework: Ajax + Drag n' Drop + File Upload + File object in controller?

前提是你 提交于 2019-12-17 22:16:45
问题 Does anyone know of a way to upload a file via Ajax and using drag n' drop from the desktop that supports PlayFramework's ability to convert file uploads to a File object? I've tried several different methods, and nothing works correctly. 回答1: Here's my successful attempt: Edit routes file and add POST /upload Application.upload Our controller is Application , I'll be using it to keep it simple. Edit your Application controller class public static void upload(String qqfile) { if (request

Move controls when Drag and drop on panel in C#

╄→гoц情女王★ 提交于 2019-12-17 19:48:41
问题 I want to drag controls on panel and when dragging I want to move the control and get its location to drop on to panel. I have tried out mouseUp, mouseDown, MouseMove events of control.But that is not what I am looking for. I want to fire DragDrop event on panel and move control. Can I do this? If you can give me an idea it will be great. Below is part of my code. Please correct me. Thanks a lot. using System; using System.Collections.Generic; using System.ComponentModel; using System.Data;