drag-and-drop

Drag and Drop does not work anymore in my project in delphi

半世苍凉 提交于 2019-12-10 10:37:55
问题 This topic obviously has been hitted over and over again here, but now I just run out of options from my point of view. OS: Windows XP SP3 So, here is Drag and Drop example for RichEdit I use in my app: procedure TForm1.AcceptFiles( var msg : TMessage ); // or TWMDROPFILES const cnMaxFileNameLen = 255; var i, nCount : integer; acFileName : array [0..cnMaxFileNameLen] of char; begin // find out how many files we're accepting nCount := DragQueryFile( msg.WParam, // or msg.Drop $FFFFFFFF,

Using JavaFX with drag and drop, is it possible to have a ghost of the dragged object follow the cursor?

喜欢而已 提交于 2019-12-10 10:34:49
问题 I have been looking for examples of Drag and Drop with Java but they always use a generic mouse cursor with a box attached to indicate an item is being dragged, whereas many tools (even browsers like Firefox) instead attach a ghost of the dragged object to the cursor to indicate what is being dragged. Can this be done in JavaFX? 回答1: Yes you can set a drag view (arbitrary image) for a drag and drop operation. 回答2: You can use DragBoard.setDragView(...); to set an image that is displayed

Java Drag and Drop an Image and Show the image thumbnail while dragging

两盒软妹~` 提交于 2019-12-10 10:27:51
问题 I have a grid layout with image nodes and I want to add in my application the dnd functionality, for example when I drag and drop an image node to an target JPanel make some actions for example show in original size, delete etc. I have achieve this with to ways one with transferhandler and one with the DropTargets, DragSource etc.But I have two questions and I want to discuss them with you. a)Which of the two ways it's better to use? I understand that the second way give me more features than

How to implement Drag and Drop in android?

柔情痞子 提交于 2019-12-10 10:23:27
问题 I am developing a puzzle game, where user has to arrange the images in the grid. The screenshot is given below I want to able to drag the image of one cell of the grid to another cell. I searched many sites and every where I found examples with Drag and drop API (I.e. by using OnDragListener etc.) which was introduced in Android 3.0, but my application should run in Android 2.2. So please help me how to implement it using Touching API (I.e. OnTouchListener etc.) 回答1: One way of doing it would

How to auto scroll the ScrollView while drag and drop

两盒软妹~` 提交于 2019-12-10 10:14:29
问题 Too many answer was there in stackoverflow, I tried some of them but didn't get the solution. That's why I'm posting my code, please check and tell me where to put auto scroll. <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" android:orientation="vertical" android:layout_width="match_parent" android:layout_height="match_parent" android:background="@color/button_text"> <android.support.v7.widget.Toolbar android:id="@

What are the clipboard formats for Microsoft Office where you can drop a chart?

北城以北 提交于 2019-12-10 09:41:25
问题 I'm trying to create a DOCX in memory that I can provide for a Drag & drop operation. I first tried "Embed Source." However, while it seems to be perfect (DOCX in an OLE wrapper), Word does not use it for drag & drop although it does use it for cut & paste. Is there a way to force Word/Excel/PPT to use "Embed Source?" Second it uses FileContents sometimes and that also looks like it would work. However while Spy shows it being requested when Word does a drag/drop to Word, it doesn't work when

Enhanced features with Drag and Drop from Treeview to Textbox in WinForms

有些话、适合烂在心里 提交于 2019-12-10 09:05:23
问题 I have the following code that successfully drags and drops a treeview node to a textbox in a WFA: private void _MyTreeView_ItemDrag(object sender, ItemDragEventArgs e) { DoDragDrop(e.Item.ToString(), DragDropEffects.Copy); } private void textBox1_DragEnter(object sender, DragEventArgs e) { e.Effect = DragDropEffects.Copy; } private void textBox1_DragDrop(object sender, DragEventArgs e) { if (e.Data.GetDataPresent(typeof(System.String))) { textBox1.Text += (System.String)e.Data.GetData(typeof

Reorder mat-table rows with angular material's drag-and-drop

谁都会走 提交于 2019-12-10 03:44:06
问题 Angular 7 brought the powerful DragDropModule with it: https://material.angular.io/cdk/drag-drop/examples The documentation deals with rearranging items within lists or transferring items between several lists. However, it doesn't talk about tables. I was wondering whether there is a comfortable way of using angular material's drag-and-drop system for reordering rows in mat-table or cdk-table. (You can add cdkDropList to mat-table which makes the mechanism work but without all the fancy

jQuery UI draggable is not working on newly created DOM element

烈酒焚心 提交于 2019-12-10 03:30:14
问题 I have some DOM element which is draggable using jQuery UI.All are working fine but when i create some element using jQuery , then they are not draggable at all. i.e $('div.draggable').draggable(); //Existing element , it works :) $('p.draggable').draggable() ; //Newly created paragraph with same class name, it doesnt work at all :( Thanks in advance !!! I am trying This : <script type="text/javascript"> $(document).ready(function(){ $('body').append('<p class="draggable">Newly Created

How to enable drag-and-drop inside JList

左心房为你撑大大i 提交于 2019-12-10 02:58:47
问题 I have a JList and want the user to be able to reorder the elements in the list using drag-n-drop (using my own ListModel and ListCellRenderer, if that makes any difference). Which Objects do I need to create, and how do I process the action? 回答1: Modified Jan Taccis answer: public class DndTest extends JFrame { JList<String> myList; DefaultListModel<String> myListModel; public DndTest() { myListModel = createStringListModel(); myList = new JList<String>(myListModel); MyMouseAdaptor