drag-and-drop

Catch DragEnter and DragDrop events on webbrowser

南笙酒味 提交于 2019-12-12 11:28:24
问题 I have TreeView, ListView and WebBrowser controls. I use the drag and drop method. With the TreeView and ListView everything works, because they have Dragdrop and DragEnter event. But I did not find them in WebBrowser. I try using: webBrowser1.Document.Body.Drag += new HtmlElementEventHandler(WebBrowser_Drag); webBrowser1.Document.Body.DragOver += new HtmlElementEventHandler(WebBrowser_DragOver); webBrowser1.Document.Body.DragEnd += new HtmlElementEventHandler(WebBrowser_DragEnd); webBrowser1

jQuery draggable : the draggable box go over the container - bug?

匆匆过客 提交于 2019-12-12 10:43:07
问题 Try this code : HTML <div class="draggable_container"> <div id="draggable_1" class="draggable"> <div class="exp"><!-- --></div> </div> </div> CSS html { height:3000px; } .draggable_container { height:300px; background-color:red; width:140px; } .draggable { height:60px; width:130px; cursor:pointer; border:5px solid #000000; background-color:#ffffff; } jQuery $(".draggable").draggable({ axis: "y", containment: 'parent' }); Now, if you click on the box "draggable" and you move the mouse up and

Jquery Drag and drop not working in Firefox, works fine in chrome and safari

时间秒杀一切 提交于 2019-12-12 10:25:54
问题 Jquery Drag and drop not working in Firefox and IE, but works fine in chrome and safari. This is my code: $(".drag").draggable({ helper: "clone", }); $(".drop").droppable({ drop: function (ev, ui) { if ($(ev.toElement).hasClass("drop") == true) { var widgetId = $(ui.draggable).attr("id"); $(ev.toElement).attr("id", "dash_" + widgetId); $(ev.toElement).html($(ui.draggable).html()); } } }); Code uploaded at http://www.skmcap63.hostoi.com/box-dashboard/ I need to drag the items from sidebar and

Qt drag and drop between two QListWidget

老子叫甜甜 提交于 2019-12-12 09:36:49
问题 I've two QListWidget (list1 and list2) list1 should be able to receive items from list2 list1 should be able to be reorganized with an internal drag and drop list2 should be able to receive items from list1 list1->setSelectionMode(QAbstractItemView::SingleSelection); list1->setDragEnabled(true); list1->setDragDropMode(QAbstractItemView::DragDrop); list1->viewport()->setAcceptDrops(true); list1->setDropIndicatorShown(true); ulist2->setSelectionMode(QAbstractItemView::SingleSelection); list2-

Dojo Drag and drop: how to retrieve order of items?

狂风中的少年 提交于 2019-12-12 09:05:00
问题 I've created a Source object and configured (via the creator) so that it renders a set of data for my users to order as they wish. This is all working fine. However, I cannot figure out how to retrieve the data once the user has re-ordered it. getAllNodes returns the dom nodes; I need the original data objects. 回答1: It is really easy — just use getItem() (described in the official documentation). Something like that will give you all data elements in order: var source = new dojo.dnd.Source(..

How to drag and drop a group of rectangles in svg in d3.js?

☆樱花仙子☆ 提交于 2019-12-12 08:57:14
问题 I worked based on this drag and drop example : I want to drag a group. I placed both rectangles in single group and now want to drag and drop whole group, in my code drag and drop works on single rectangle but not on group. and here is my code : <!DOCTYPE html> <html> <head> <script type="text/javascript" src="http://mbostock.github.com/d3/d3.js"> </script> <title>Drag And Drop</title> </head> <body> <div id="viz"></div> <script type="text/javascript"> var vizSVG = d3.select("#viz") .append(

Drag & Drop from TableView to Another View in Swift

╄→гoц情女王★ 提交于 2019-12-12 08:54:00
问题 I'm trying to copy an item from one UITableView to another View and I've been banging my head over this for the past 2 days and still i am not able to figure out how to accomplish this. Here is a little sketch of my UI architecture Here is what i am doing Long Press on a row in the tableview Create a snapshot of the image in the cell when long pressed Drag the snapshot to the View(Green area) outside the table view When released check whether the snapshot was dropped in the Green View Area. I

Is there an easy way to do click-and-drag scrolling in text frames?

末鹿安然 提交于 2019-12-12 08:35:26
问题 I have a div with overflow:auto and a scroll bar, and I'd like to be able to drag the contents to scroll. I don't need to be able to select text. Is there an easy way to do this? A jQuery plugin would be good, otherwise plain old JavaScript would be fine. It seems I haven't made myself clear enough. There's a div with a fixed height that I want to scroll. Instead of picking up the scroll bar, I want to click and drag inside the text in the opposite direction. Like on an iPhone. Like in

HTML5 Drag and Drop (DnD): changing cursor

自闭症网瘾萝莉.ら 提交于 2019-12-12 08:24:41
问题 While dragging an element over the browser client area in HTML5, how can I change the cursor to any cursor that I want? So far, I've only been able to display the default cursor while dragging (except for the none cursor wherever dropping is not supported). I'm not talking about any of the following: using event.dataTransfer.setDragImage() to display an image besides the cursor using event.dataTransfer.dropEffect to display a copy or a link symbol besides the cursor, or to change the cursor

Flex/AS3 Drag Drop - Custom Drop Feedback

安稳与你 提交于 2019-12-12 08:16:56
问题 I am using a HorizontalList component to display a list of images, you can drag images from another component to join the list, this all works fine. If I do list.showDropFeedback(event) I get an unsightly black bar at the top of images in the HorizontalList - what I really want is a line to the left/right of the image, where the new one will actually sit. I guess I need to define a custom DropFeedback to override the default. Does anyone know if there there is a way to achieve this? Thanks!