drag-and-drop

Could someone explain gtk2hs drag and drop to me, the listDND.hs demo just isn't doing it for me?

旧巷老猫 提交于 2019-12-24 15:19:29
问题 As the title says, I just don't get DND (or rather I understand the concept and I understand the order of callbacks, I just don't understand how to setup DND for actual usage.) I'd like to say that I've done DND stuff before in C, but considering I never really got that working... So I'm trying (and mostly succeeding, save DND) to write a text editor (using gtksourceview, because it has built in code highlighting.) Reasons are below if you want them. Anyways, there's not really a good DND

Matlab drag and drop file from windows explorer to figure (gui)

柔情痞子 提交于 2019-12-24 14:23:08
问题 I would like to know it there is a way to drag a file from Windows explorer and drop it in my GUI. The goal should be to get the file path (or folder path) and be able to load it with my own loading function. I precise that I am using Matlab 2015b in Windows 10 64bits. I edit my post to give an code example of what I am trying to do (based on Yair Altman solution and other found in Internet) : function demo % Set-up a figure droppable axis hFig = figure('name','DND example','numbertitle','off

PyQt MimeData Filename

强颜欢笑 提交于 2019-12-24 14:15:51
问题 I am essentially repeating a question that was asked (but not answered) in the comments of PyQt: Getting file name for file dropped in app . What I'd like to be able to do, a la that post, is convert an output from a file drop event in pyqt that currently looks like this: /.file/id=6571367.661326 into an actual file path (i.e. /.Documents/etc./etc./myProject/fileNeeded.extension) so that I can make use of the file that made the attempted QDropEvent. how to do this. Any thoughts? EDIT: As

Drag and Drop in C#

时间秒杀一切 提交于 2019-12-24 13:43:12
问题 How do you do a "drag and swap" in c#? I want my first label to replace the second, and vice versa. Thanks! Below is my drag and drop code--I'm hoping I can insert something under the dragdrop method but I don't know how to reference where the data is being posted. private void DragDrop_MouseDown(object sender, MouseEventArgs e) { Label myTxt = (Label)sender; myTxt.DoDragDrop(myTxt.Text, DragDropEffects.Copy); } private void DragDrop_DragEnter(object sender, DragEventArgs e) { if (e.Data

how do I get the last item from the listview

岁酱吖の 提交于 2019-12-24 12:44:25
问题 My problem is about handling drag and drop in a ListView. So I get the selected ListViewItem. ListView.SelectedListViewItemCollection itemCollection = (ListView.SelectedListViewItemCollection)e.Data.GetData("System.Windows.Forms.ListView+SelectedListViewItemCollection"); If i move a new element via drag&drop (for example from windows explorer), the itemCollection equals null, because i dont select an item in the listview. private void DragDropHandler(object sender, DragEventArgs e) { ListView

Drag and drop image with TransferHandler

自闭症网瘾萝莉.ら 提交于 2019-12-24 11:52:12
问题 I am trying to make simple java app to drag and drop image into JLabel which is on JFrame with no luck. I will later use this functionality in my program which will receive dropped image, resize it and then adjust brightness. What is simplest way to make it and to save that image for further editing? Here is my code which only receives dropped text: import java.awt.image.BufferedImage; import javax.swing.JFrame; import javax.swing.JLabel; import javax.swing.TransferHandler; class DragNDrop

Drag and drop image with TransferHandler

℡╲_俬逩灬. 提交于 2019-12-24 11:48:03
问题 I am trying to make simple java app to drag and drop image into JLabel which is on JFrame with no luck. I will later use this functionality in my program which will receive dropped image, resize it and then adjust brightness. What is simplest way to make it and to save that image for further editing? Here is my code which only receives dropped text: import java.awt.image.BufferedImage; import javax.swing.JFrame; import javax.swing.JLabel; import javax.swing.TransferHandler; class DragNDrop

In MVVM, open context menu upon drag completion

六眼飞鱼酱① 提交于 2019-12-24 11:44:47
问题 In a software that is highly interactive, the user can do drag and drop operations on a collection of UserControl s. Upon drop, they should be presented with a ContextMenu offering some choices on how to perform the action, e.g., copy the item, or swap positions if there is another item at the drop location. Using the Prism framework, the ideal way of implementing this would be by means of the InteractionRequestTrigger , for instance: <i:Interaction.Triggers> <prism:InteractionRequestTrigger

Defining a drag container inside another drag container

谁都会走 提交于 2019-12-24 10:49:01
问题 This is in relation to implementing drag and drop using vue. I have a draggable div container. // BoardColumn Component Parent Container <template> <div draggable @dragover.prevent @dragenter.prevent @drop="dropColumn($event, columnIndex)" @dragstart="setPickColumnInfo($event, columnIndex)" > <div class="column bg-grey-light m-4"> <div class="flex items-center mb-2 font-bold"> {{ getColumnName() }} </div> <div class="list-reset"> <TaskCard class="task" v-for="(task, $taskIndex) of columnData

Prevent ghost image on dragging non-draggable elements?

浪子不回头ぞ 提交于 2019-12-24 10:36:47
问题 I'm creating a website that utilizes the HTML5 Drag and Drop API. However, to increase the user experience, I'd like to prevent ghost images when a user drags non-draggable elements. Is this even possible? Further, almost every element seems " draggable " by default. One can click and then quickly drag pretty much any element in a browser, which creates a ghost image along with a no-drop cursor. Is there any way to prevent this behaviour? draggable="false" doesn't work. user-select: none