drag-and-drop

drag and drop on NotifyIcon in tray in C#

天涯浪子 提交于 2019-12-17 19:18:00
问题 I am trying to create a C# application that runs in tray where I can drop files on it's icon. Is there any way to get the path of the file dropped on the System Tray icon? System.Windows.Forms.NotifyIcon does not have any events related to drag and drop. 回答1: it's not possible to do this, the easy way. You can show a dummy Form, if the cursor is in a special area near the notifyicon. The dummy Form can get the filepath of the droped file. 回答2: It has az example, but it's not fully and written

Reordering UITableView without reorder control

走远了吗. 提交于 2019-12-17 19:13:25
问题 I need the user to be able to reorder a UITableView by this way: he touches a cell for a predetermined period (e.g. 1 second), then he can drag and drop it over the other cells. I know how to implement the 'long touch' detection using a gesture recognizer, but what is the best way to implement the drag and drop ability without using a reorder control (the user should drag the cell from anywhere in the cell, not only from the reorder control)? 回答1: This is an old question, but here's a

Drag and drop virtual files using IStream

心已入冬 提交于 2019-12-17 19:00:03
问题 I want to enable drag and drop from our windows forms based application to Windows Explorer. The big problem: The files are stored in a database, so I need to use delayed data rendering. There is an article on codeproject.com, but the author is using a H_GLOBAL object which leads to memory problems with files bigger than aprox. 20 MB. I haven't found a working solution for using an IStream Object instead. I think this must be possible to implement, because this isn't an unusual case. (A FTP

adding dynamic view using WindowManager.addView

♀尐吖头ヾ 提交于 2019-12-17 18:55:57
问题 I have a code on ICS for tablets. I want to add a Imageview dynamicly to a fragment. The fragment already contains preferencelist. The code for adding the view dynamically is as follows. I am coding this drag and drop functionality. This part of the code is taken from TouchInterceptor.java file from android music app. mWindowParams = new WindowManager.LayoutParams(); mWindowParams.gravity = Gravity.TOP ; mWindowParams.x = 0; mWindowParams.y = y mWindowParams.height = WindowManager

C# Drag & drop from listbox to treeview

孤街醉人 提交于 2019-12-17 18:43:14
问题 I have a winform with a listbox and a treeview. Once my listbox is filled with items, I want to drag them (multiple or single) from the listbox and drop them in a node in the treeview. If somebody has a good example in C# that would be great. 回答1: It's been a while since I've messed with Drag/Drop so I figured I'll write a quick sample. Basically, I have a form, with a listbox on the left, and a treeview on the right. Then I put a button on top. When the button is clicked, it just puts the

Javascript ondrag, ondragstart, ondragend

我是研究僧i 提交于 2019-12-17 18:29:16
问题 I've been trying to use ondrag() and some other functions on a div rendered dynamically on an HTML page. None of these events seem to fire, nor do I get any errors. I can't find much helpful documentation on it either. Am I interpreting it wrongly, can you use these events to script functionality to drag a div around the screen? 回答1: Have a look at this documentation: https://developer.mozilla.org/En/DragDrop/Drag_and_Drop Note: It does not work in every browser. If you want a cross-browser

android - how to catch Drop action of ItemTouchHelper which is used with RecyclerView

萝らか妹 提交于 2019-12-17 18:13:08
问题 I have a problem with ItemTouchHelper of RecyclerView . I am making a game. The game board is actually a RecyclerView. RecyclerView has GridLayoutManager with some span count. I want to implement drag & drop recyclerview's items. Any item can dragging over all directions (up, down, left, right). private void initializeLayout() { recyclerView.setHasFixedSize(true); recyclerView.setLayoutFrozen(true); recyclerView.setNestedScrollingEnabled(false); // set layout manager GridLayoutManager

disable text drag and drop

纵然是瞬间 提交于 2019-12-17 18:07:56
问题 There is a common feature of modern browsers where a user can select some text and drag it to an input field. Within the same field it causes moving of text, between different fields it does copying. How do I disable that? If there is no portable way, I am mostly interested in firefox. This is an intranet webapp, so I am also interested in modifying the browser/getting a plugin to do this. Maybe some system-level settings (I`m on windows XP)? I need to keep the default select-copy-paste

Drag, drop and shape rotation with Raphael JS

℡╲_俬逩灬. 提交于 2019-12-17 17:54:10
问题 I'm using RaphaelJS 2.0 to create several shapes in a div. Each shape needs to be able to be dragged and dropped within the bounds of the div, independently. Upon double clicking a shape, that shape needs to rotate 90 degrees. It may then be dragged and dropped and rotated again. I've loaded some code onto fiddler: http://jsfiddle.net/QRZMS/. It's basically this: window.onload = function () { var angle = 0; var R = Raphael("paper", "100%", "100%"), shape1 = R.rect(100, 100, 100, 50).attr({

jQuery draggable table elements

牧云@^-^@ 提交于 2019-12-17 17:44:14
问题 jQuery's draggable functionality doesn't seem to work on tables (in FF3 or Safari). It's kind of difficult to envision how this would work, so it's not really surprising that it doesn't. <html> <style type='text/css'> div.table { display: table; } div.row { display: table-row; } div.cell { display: table-cell; } </style> <script src="http://code.jquery.com/jquery-latest.js"></script> <script src="http://dev.jquery.com/view/tags/ui/latest/ui/ui.core.js"></script> <script src="http://dev.jquery