New answers tagged drag-and-drop
1
vote
Accepted
Drag and Drop Widgets within QScrollArea in PyQt6 Not Working Correctly
Most UI toolkits and graphics related software are based on the concepts of relative coordinate systems and parent/child relations (which is common in OOP).
Your first attempt is invalid, because the ...
1
vote
WPF Drag and drop - System.InvalidOperationException. Dispatcher processing has been suspended, but messages are still being processed
In your repro project you're using TextBox but you made them all read only. If you really don't need them to be able to be changed then use a TextBlock and the exception goes away.
I had a similar ...
0
votes
Reactflow, how to make custom nodes as droppable areas for draggable elements
You can use Dropzone.
import React, { useState, DragEvent } from 'react';
import { Paper, Typography, IconButton, Divider, Fab, Box, styled } from '@mui/material';
import DeleteIcon from '@mui/icons-...
0
votes
Angular Drag & Drop with nested section and subsection
As stated here:
If you have an unknown number of connected drop lists, you can use the cdkDropListGroup directive to set up the connection automatically. Note that any new cdkDropList that is added ...
0
votes
Combining item replacement and reordering in SwiftUI List using onDrag and onDrop and onMove
Instead of using .onDrag use .itemProvider.
That seems to be the magic after hours of trial and error.
0
votes
Dndkit how to force an item to remain in place in a vertical sortable list? (Also open to using other dnd libraries)
All modern dnd libraries would probably require changing source code for an ergonomic solution.
The best option for this seems to be Jquery sortable lists:
Forcing an item to remain in place in a ...
0
votes
WPF Drag and drop - System.InvalidOperationException. Dispatcher processing has been suspended, but messages are still being processed
Your event handlers interfere with the default behaviour of the TextBox control.
The easiest way to work around this by opting out of the default behaviour would be to set the Handled property of the ...
0
votes
WPF Drag and drop - System.InvalidOperationException. Dispatcher processing has been suspended, but messages are still being processed
Hi I think problem is in the Dispatcher.Invoke call could you please try direct call the method DragDrop.DoDragDrop without calling from UI Thread , Its create issue may be that cause the ...
0
votes
How to disable iOS 11 and iOS 12 Drag & Drop in WKWebView?
In my opinion, even after applying allowsLinkPreview=false on the web view page, I understood that dragging occurred when assuming an image with a link.
Here's how I resolved it:
Targeting only macOS, ...
0
votes
event.dataTransfer.files is empty when ondrop is fired?
So, I was REALLY annoyed by this behavior. So I came up with a little loop, that basically clones the whole object:
const seen = new WeakSet()
const parseObj = (obj) => {
const newObj = {}
...
0
votes
Does HTML5 allow drag-drop upload of folders or a folder tree?
This answer is based on the accepted answer but uses promises. The code is extremely clean and has been thoroughly tested. It uses deferred promises (using p-defer) to avoid the need to wrap code in a ...
1
vote
Accepted
Cannot drag again after dropping an element
I hope I understood the problem.
The drag gesture's translation property shows how much it moved from current position. So just setting it to offset causes it to snap back to (0, 0) in the start. So ...
0
votes
Dnd-kit transition doesn't work on drop of draggable item
use a state and useEffect to track drag ending.
const { attributes, listeners, setNodeRef, transform, isDragging, active }
= useDraggable({id});
const [style, setStyle] = useState({});
useEffect(() ...
0
votes
How to detect the dragleave event in Firefox when dragging outside the window
Here's an event handler for window:dragleave which detects if something is dragged outside the window
onDragLeave(evt: DragEvent) {
const draggedOffScreen: boolean = evt.screenX === 0 && evt....
0
votes
Is it possible to use the HTML5 Drag and drop API with JSON and JavaScript?
You can just add the event listener to a parent element, like #narrow. The event target will still be the image, because it is the only element that you allowed being dragged.
Btw.: Don't define ...
1
vote
Drag and drop in WPF on .NET 8 / C# does not work - bug in framework?
Ok, I have a solution for this problem.
It's simple:
Replace all your _DragOver events with _PreviewDragOver
Replace all your _Drop events with _PreviewDrop
Apparently, DragOver & Drop events are ...
Top 50 recent answers are included
Related Tags
drag-and-drop × 13459javascript × 3529
jquery × 2250
html × 1996
c# × 1287
android × 1029
java × 932
jquery-ui × 721
wpf × 714
draggable × 635
angular × 560
reactjs × 553
css × 510
swing × 403
winforms × 396
ios × 364
python × 317
qt × 299
cocoa × 264
swift × 262
angularjs × 258
objective-c × 228
drag × 221
.net × 212
macos × 209