drag-and-drop

Delphi window losing focus after custom drag

笑着哭i 提交于 2019-12-12 21:27:08
问题 I've got this code that moves my Main Window around when I drag around MyThingThatDragsIt procedure TMainForm.ApplicationMessage(var Msg: TMsg; var Handled: Boolean); var ScreenPt : TPoint; DragControl : TControl; begin inherited; if Msg.message = WM_LBUTTONDOWN then begin ScreenPt := ScreenToClient(Msg.pt); DragControl := FindDragTarget(Msg.pt , false); if Assigned(DragControl) and ((DragControl = MyThingThatDragsIt) ) then begin ReleaseCapture; self.Perform(WM_SYSCOMMAND, SC_MOVE or $0002,

Drag and drop not working in C#

独自空忆成欢 提交于 2019-12-12 20:37:35
问题 I created a drag and drop control within C# to allow people to drop files onto my form. Here's the problem I'm having, it works fine when it's being debugged; however when running my program in administrator mode it doesn't work. Is there any reason for this? Here's my code: private void panel1_DragEnter(object sender, DragEventArgs e) { if (e.Data.GetDataPresent(DataFormats.FileDrop)) e.Effect = DragDropEffects.Copy; else e.Effect = DragDropEffects.None; } string startDir; private void

Drag and Drop between different layout units in Primefaces

自古美人都是妖i 提交于 2019-12-12 20:13:36
问题 I have 4 layout units in full-page Primefaces layout. I have outputlabel in west layout unit. I want to drag it and drop it to center layout-unit. The drop area which I want to drop output label to here is a panel in tabView. When I start the dragging outputLabel don't go out from west layout-unit. Also when I drag it to out of west layout-unit it disappears. How can I solve my problem? I've been working on it for 2 days but I haven't succeed. Here is my code: <!DOCTYPE HTML PUBLIC "-//W3C/

Drag and Drop in JList is not working

耗尽温柔 提交于 2019-12-12 19:21:57
问题 So I have written a TransferHandler for my application (along the example from Oracle site) but when I am trying to move the data it is not moving. All it is doing is copying the data at index ( n-1 i.e if I am moving and item to n location) to index n. Could you please check what is wrong, though I have tried many options but none of them is working for me. import javax.swing.TransferHandler; import javax.swing.*; import java.awt.datatransfer.*; public class ListTransferHandler extends

Check if a drag&drop is in progress

北战南征 提交于 2019-12-12 18:34:01
问题 Is there any way to check if a drag and drop is in progress? Some method or win32 api which can be checked? I know I can set AllowDrop and use events but it doesn't work in this case. Basically i want to check, with code, if any drag&drop is in progress. 回答1: I had a similar question which I answered myself (after some hours messing about) See - How do I tell if a Drag Drop has ended in Winforms?. Basically if you do as earwicker suggests you need to set the flag when the drag drop begins

Drag and drop of images between layout units in primefaces layout is not working?

末鹿安然 提交于 2019-12-12 18:12:57
问题 we want to implement drag and drop of images from left layout unit on to centre layout unit in Primefaces layout. we tried to add Z index for all layout units as suggested in some stack over flow questions but adding Z index also so couldn't fire on drop event and even scrollable is disabled for all layout units please help so that images can be dragged and dropped on centre layout event listener fires XHTML <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR

Convert click event into Observable Mouse Event (Angular 2/4)

旧街凉风 提交于 2019-12-12 18:11:52
问题 I'm trying to make Drag and Drop functionality on my own without use any opensource modules. When I use single element and create Observables in the controller like: const mouseup = Observable.fromEvent(item, 'mouseup'); const mousemove = Observable.fromEvent(document, 'mousemove'); const mousedown = Observable.fromEvent(item, 'mousedown'); Drag works fine. But when I bind event in template with (click) and pass $event to controller like: (click)="click($event)" I can't convert event into

TranslateTransform for drag and drop in Silverlight

拜拜、爱过 提交于 2019-12-12 16:19:20
问题 We're trying to implement drag and drop in Silverlight (3). We want users to be able to drag elements from a treeview onto another part of a UI. The parent element is a Grid, and we've been trying to use a TranslateTransform along with the MouseLeftButtonDown, MouseMove (etc) events, as recommended by various online examples. For example: http://www.85turns.com/2008/08/13/drag-and-drop-silverlight-example/ We're doing this in IronPython, but that should be more or less irrelevant. The drag

javascript drag and drop with partial preventDefault

蓝咒 提交于 2019-12-12 16:18:50
问题 Gmail handles its drag-and-drop file attachment uploading in a few clever ways: 1) Dragging a file into the browser causes the dropzone to appear. The cursor displays feedback indicating whether you are in the dropzone or not (in windows, a red crossthrough circle is used if outside the dropzone). If you drop inside the window but outside of the dropzone, the drop is intercepted such that the browser's default behavior is prevented (usually navigating away to display the dragged file). The

Catch image dragged into a text field in Javascript

有些话、适合烂在心里 提交于 2019-12-12 16:04:26
问题 I want to allow a user to drag an image from a web page into my web app and then store and use the image url elsewhere in the application. So I'm creating an input field as the drag target. But since that allows to drop any draggable web object (like links), I need to do some error checking. I could put a button there, but it would be nicer if the drop is auto-detected. So the question is... are there any event handlers - primarily supported in IE7 and Firefox3 - that get triggered when the