Search Results

Search found 2355 results on 95 pages for 'drag'.

Page 9/95 | < Previous Page | 5 6 7 8 9 10 11 12 13 14 15 16  | Next Page >

  • Drag and drop objects onto a DIV.. relative vs absolute position and size of target DIV

    - by Scott
    Hi, I have a question about drag and drop and hoping one of you already solved it. I have an online web app where I can drag and drop annotations (arrows, stars) on top of an image that sits on a DIV. Here's some things to know. 1) The image can be any size (sometimes big sometimes small) 2) The DIV of wrapper can be left aligned or centered 3) The DIV of wrapper can be fixed or auto So is there any possible solution to make it so positions of annotations are always relative to the top left corner of the image? So I am using jQuery. How would I get an annotation's position always relative to the top left corner of an image once I drop object? Thanks!

    Read the article

  • How do I drag and drop a folder in Winforms?

    - by Tuntuni
    I would like to know how to drag & drop the folder and get its name. I already know how to do it with a file, but I'm not really sure how to modify it to be able to drag folders as well. Here's the code of the event that is triggered when a file is dropped. private void checkedListBox_DragDrop(object sender, DragEventArgs e) { if (e.Data.GetDataPresent(DataFormats.FileDrop)) { //I'm only interested in the first file, even if there were multiple files //dropped string fileName = ((string[])e.Data.GetData(DataFormats.FileDrop))[0]; } } Thanks, Tuntuni.

    Read the article

  • How can I implement drag-out-to-delete in Flex?

    - by Chris R
    I have a List component from which I'd like to be able to remove items using drag & drop, but without having a specific target. If you use the mac, the behaviour I'm looking for is something like what the Dock uses; when you drag something out of the bounds of the control it should get an icon that indicates that it'll be deleted (OSX uses a cloud or something?) and then if you release it it will be removed from the list. How can I do this? (If I need to provide a more clear description, please comment; I'll fill in what I can)

    Read the article

  • How to build a Drag and Dropable Tree using Jquery for Menu?

    - by Anil
    Hi all i want to build a Menu Builder with drag and drop which i am trying to do like here is the jsfiddle of what i am trying to do This and i want the functionality to be like This i will have all products list on a side and i should have a Add column button ,when i click on Add Column button a div should open where i should be able to drag and drop my products like the above the first product i drop in a div should be main then i should be able to add child to that particular product i should be able to add any number of submenus to it like this div1 Mens shoes SportShoes CasualShoe Shirts Casualshirts div2 Womens shoes SportShoes CasualShoe Shirts Casualshirts this is what i have to do can any one help me doing this please

    Read the article

  • UI: where to display a status result from a drag & drop?

    - by Jason S
    So I've got drag & drop working. When a drop occurs, I do some processing, and sometimes there is a result that I want to make the user aware of. Right now I am just outputting to the console which isn't very nice. What's an appropriate way to display a status result from a drag & drop? Somehow a modal dialog box seems inappropriate, and a status bar is too space-constrained, I think.

    Read the article

  • In a drag and drop Is here a way to make a destination folder/app window stay on top when the source folder window is underneath? (Windows/Linux)

    - by Rob
    Scenario: You have a file Window, where you want to drag a file from, and on top of this Window is another window, the destination: an app or another window. So you click on the file you want on the window underneath, and what happens? This is brought to the front and so the destination window is out of view, what a pain. How can you make the destination window stay on top? Windows and Linux please.

    Read the article

  • Qt 4.x: how to implement drag-and-drop onto the desktop or into a folder?

    - by Jeremy Friesner
    Hi all, I've written a little file-transfer application written in C++ using Qt 4.x ... it logs into a server, shows the user a list of files available on the server, and lets the user upload or download files. This all works fine; you can even drag a file in from the desktop (or from an open folder), and when you drop the file icon into the server-files-list-view, the dropped file gets uploaded to the server. Now I have a request for the opposite action as well... my users would like to be able to drag a file out of the server-files-list-view and onto the desktop, or into an open folder window, and have that file get downloaded into that location. That seems like a reasonable request, but I don't know how to implement it. Is there a way for a Qt application to find out the directory corresponding to where "drop event" occurred, when the icon was dropped onto the desktop or into an open folder window? Ideally this would be a Qt-based platform-neutral mechanism, but if that doesn't exist, then platform-specific mechanisms for MacOS/X and Windows (XP or higher) would suffice. Any ideas?

    Read the article

  • Cocoa Drag and Drop, reading back the data. [Newbie]

    - by kodai
    Ok, I have a NSOutlineView set up, and I want it to capture PDF's if a pdf is dragged into the NSOutlineView. My first question, I have the following code: [outlineView registerForDraggedTypes:[NSArray arrayWithObjects:NSStringPboardType, NSFilenamesPboardType, nil]]; In all the apple Docs and examples I've seen I've also seen something like MySupportedType being an object registered for dragging. What does this mean? Do I change the code to be: [outlineView registerForDraggedTypes:[NSArray arrayWithObjects:@"pdf", NSStringPboardType, NSFilenamesPboardType, nil]]; Currently I have it set up to recognize drag and drop, and I can even make it spit out the URL of the dragged file once the drag is accepted, however, this leads me to my second question. I want to keep a copy of those PDF's app side. I suppose, and correct me if I'm wrong, that the best way to do this is to grab the data off the clipboard, save it in some persistant store, and that's that. (as apposed to using some sort of copy command and literally copying the file to the app director.) That being said, I'm not sure how to do that. I've the code: - (BOOL)outlineView:(NSOutlineView *)ov acceptDrop:(id <NSDraggingInfo>)info item:(id)item childIndex:(NSInteger)childIndex { NSPasteboard *pboard = [info draggingPasteboard]; NSURL *fileURL; if ( [[pboard types] containsObject:NSURLPboardType] ) { fileURL = [NSURL URLFromPasteboard:pboard]; // Perform operation using the file’s URL } NSData *data = [pboard dataForType:@"NSPasteboardTypePDF"]; But this never actually gets any data. Like I said before, it does get the URL, just not the data. Does anyone have any advise on how to get this going? Thanks so much!

    Read the article

  • Solving the context menu problem with drag and drop in trees

    - by Frank Nimphius
    Normal 0 false false false EN-US X-NONE X-NONE /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-priority:99; mso-style-qformat:yes; mso-style-parent:""; mso-padding-alt:0in 5.4pt 0in 5.4pt; mso-para-margin:0in; mso-para-margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:11.0pt; font-family:"Calibri","sans-serif"; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-fareast-font-family:"Times New Roman"; mso-fareast-theme-font:minor-fareast; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin; mso-bidi-font-family:"Times New Roman"; mso-bidi-theme-font:minor-bidi;} The following drag-and-drop problem has been reported on OTN: An ADF Faces tree component is configured with a af:collectionDropTarget tag to handle drop events. The same tree component also has a context menu defined that is shown when users select the tree with the right mouse button. The problem now was - and I could reproduce this - that the context menu stopped working after the first time the tree handled a drop event. The drag and drop use case is to associate employees from a table to a department in the tree using drag and drop. The drop handler code in the managed bean looked up the tree node that received the drop event to determine the department ID to assign to the employee. For this code similar to the one shown below was used List dropRowKey = (List) dropEvent.getDropSite(); //if no dropsite then drop area was not a data area if(dropRowKey == null){    return DnDAction.NONE; }                tree.setRowKey(dropRowKey); JUCtrlHierNodeBinding dropNode = (JUCtrlHierNodeBinding) tree.getRowData(); Normal 0 false false false EN-US X-NONE X-NONE /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-priority:99; mso-style-qformat:yes; mso-style-parent:""; mso-padding-alt:0in 5.4pt 0in 5.4pt; mso-para-margin:0in; mso-para-margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:11.0pt; font-family:"Calibri","sans-serif"; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-fareast-font-family:"Times New Roman"; mso-fareast-theme-font:minor-fareast; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin; mso-bidi-font-family:"Times New Roman"; mso-bidi-theme-font:minor-bidi;} Normal 0 false false false EN-US X-NONE X-NONE /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-priority:99; mso-style-qformat:yes; mso-style-parent:""; mso-padding-alt:0in 5.4pt 0in 5.4pt; mso-para-margin:0in; mso-para-margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:11.0pt; font-family:"Calibri","sans-serif"; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-fareast-font-family:"Times New Roman"; mso-fareast-theme-font:minor-fareast; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin; mso-bidi-font-family:"Times New Roman"; mso-bidi-theme-font:minor-bidi;} So what happens in this code? The drop event contains the dropSite reference, which is the row key of the tree node that received the drop event. The code then sets the key to the tree in a call to getRowDate() returns the node information for the drop target (the department). This however causes the tree state to go out of synch with its model (ADF tree binding), which is known to cause issues. In this use case the issue caused by this is that the context menu no longer shows up. To fix the problem, the code needs to be changes to read the current row key from the key, then perform the drop operation and at the end set the origin (or model) row key back //memorize current row key Object currentRowKey = tree.getRowKey();        List dropRowKey = (List) dropEvent.getDropSite(); //if no dropsite then drop area was not a data area if(dropRowKey == null){   return DnDAction.NONE;   }              tree.setRowKey(dropRowKey); JUCtrlHierNodeBinding dropNode = (JUCtrlHierNodeBinding) tree.getRowData(); ... do your stuff here .... //set current row key back tree.setRowKey(currentRowKey); AdfFacesContext.getCurrentInstance().addPartialTarget(tree); Node the code line that sets the row key back to its original value.

    Read the article

  • Multi-file, simultaneous, drag-and-drop file uploads in the browser without ActiveX?

    - by qiq
    I like how Windows Skydrive lets you drag files into Internet Explorer where an ActiveX component uploads those files to your Skydrive account in a queue. This avoids the cumbersome traditional HTML approach where you present multiple "Browse" buttons and the user has to select individual files one by one, click Upload and then select more files after the first batch completes. What I'm not sure is how the same effect could be achieved in a web app without ActiveX. Any suggestions?

    Read the article

  • How can I cancel Drag and Drop operation in Java/Swing programmatically?

    - by AlexV
    I am just wondering if it's possible to I cancel "Drag and Drop" operation in Java/Swing programmatically? So the effect would be similar to if the user pressed the "ESC" key? I was expecting DragSourceDragEvent or DragSourceContext to have a cancelDrag() method, similar to DropTargetDragEvent which has acceptDrag() and rejectDrag() methods (both of which does not do what I want). I am missing something?

    Read the article

  • HTML5 Canvas + select / drag-and-drop features in a JS lib?

    - by István
    Hi, I'd like to use HTML5 Canvas, but I'd like to use it in terms of shapes, texts and curves, able to attach traditional DOM events like onClick or drag-and-drop functions. Is there any Javascript library that is able to do that for me? I've seen that gwt-canvas is close to this approach, but haven't looked it in details. Thanks, Istvan

    Read the article

  • How can I allow Drag and Drop from Windows Explorer into a C# WPF application?

    - by Seabass__
    I know there have been tons of answers on this subject, but I still cannot get it to work at all. I've enabled AllowDrop on every control at every level of the application, and tried to catch DragEnter and Drop on every control to no avail. I can drag and drop items inside the application, but any time I try to bring something in from Windows Explorer or the desktop, etc. it gives me the No icon. Any ideas what I might be doing wrong?

    Read the article

  • (VB.NET + WPF) Drag + Drop (to allow user sorting) of stackpanel elements within a Scrollviewer?

    - by Matt H.
    I have good model (I think!) for how to allow a user to drag an element in a stackpanel and reposition it to another location within the stackpanel. However, my Stackpanel is placed within a ScrollViewer, like this (generalized): <ScrollViewer> <StackPanel> ....First item ....Second item ....Third item ....Etc. </StackPanel> <ScrollViewer> Here is the problem, I wish to simulate the functionality of programs like word, where if I am dragging selected content (or an object) outside the viewable area, the window will scroll in the direction of the mouse to see more places to drop my nifty little object. ...i.e. If I move the mouse to the top of my ScrollViewer while dragging a stackpanel's contents, I want the scrollviewer to slowly move up so I can see more locations to drop my content. Any suggestions? If you can help me solve this, you will be a godsend!

    Read the article

  • How to create a controllable flip effect (flip as far (and fast) as you drag) of an UIView

    - by allisone
    I have a card (a flashcard you could say) What I can do: On fingersweeping over the flashcard the card gets turned. It's happening by detecting touchesBegan and touchesMoved and then I do stuff like [UIView beginAnimations:@"View Flip" context:nil]; [UIView setAnimationDuration:0.5]; [UIView setAnimationCurve:UIViewAnimationCurveEaseInOut]; if (left) { [UIView setAnimationTransition: UIViewAnimationTransitionFlipFromLeft forView:self.flashCardView cache:YES]; }else{ [UIView setAnimationTransition: UIViewAnimationTransitionFlipFromRight forView:self.flashCardView cache:YES]; } What I can't do (but want to): I want to somehow drag the flip. Imagine this, you have a flashcard and you think you know the answer, you start flipping the card around because you want to see if you are correct, but then... no stop... you hesitate, turn back the card to the way it was, rethink, get the real answer and then finally flip to see that you were right to hesitate. Now I only have: once you start flipping, you can't stop it.

    Read the article

  • Flash: Correctly handling click-and-drag outside the browser?

    - by David Wolever
    What's the correct way to detect, from Flash, when someone has started a drag within the browser (eg, a MOUSE_DOWN event), dragged the mouse outside the browser window, released the button, then moved the mouse back over the browser? For example (assuming StackOverflow was a Flash application): I've tried the "obvious" thing, checking event.buttonDown in the MOUSE_MOVE handler, but even though the mouse button is up, event.buttonDown is true in step 2 (above). So, is there any other way to check the "real" status of the mouse button? Or any other way to handle this situation?

    Read the article

  • JavaScript Drag and Drop Grid With Elements of Different Sizes.

    - by Paul67
    I need to be able to drag and drop boxes of differing dimensions on the same grid. JQuery UI seems to offer 80% of what I'm after particularly the sortable grid the have on their demo page. The only problem is that this grid only works with boxes of identical dimensions. My requirement is to be able to have the same functionality but with boxes that are sized as multiples of the base unit. For example - let's say the standard box size is 300x300px I would also like the opportunity to show on the same grid a 300x600px and a 600x600px box. There's no requirement to display boxes that are not multiples of the dimensions of the smallest box size.

    Read the article

  • In python, how do I drag and drop 1 or more files onto my script as arguments with absolute path? (f

    - by chromejs10
    I am writing a simple Python script with no GUI. I want to be able to drag and drop multiple files onto my python script and have access to their absolute paths inside of the script. How do I do this in Mac, Linux, and windows? For times sake, just Mac will be fine for now. I've googled this question and only found one related one but it was too confusing. I am currently running Mac OS X Snow Leopard. Any help is much appreciated. Thanks!

    Read the article

  • HTML5 drag & drop: The dragged element content is missing in Webkit browsers.

    - by Cibernox
    I'm trying to implement something similar to a cart where you can drop items from a list. This items (<li> elements) has some elements inside (divs, span, and that stuff). The drag and drop itself works great. But the dragged element's image doesn't show its content in Webkit browsers. My list element has a border an a background color. In Firefox, the image is the whole item. In Webkit browsers, only the dragged element without content. I see the background and border, but without text inside. I tried to make a copy of the element and force it to be the image, but doesn't work. var dt = ev.originalEvent.dataTransfer; dt.setDragImage( $(ev.target).clone()[0], 0, 0); I have a simplified example that exhibit the same behavior: http://jsfiddle.net/ksnJf/1/

    Read the article

  • Ruby Drag-n-Drop IDE and Ruby programming related

    - by RPK
    I am writing a small desktop GUI application using Ruby and Gtk2. I am using RubyMine 3 on Linux (Fedora). I created a simple class to create a Gtk Window but now I feel it takes more time to just keep adding code for a Button, Drop Down and TextBox etc. I need to write even more code if the DropDown needs to be populated at run-time. Is there any Ruby Gtk IDE which supports adding Controls with simple drag-n-drop? At least I can focus on the business logic instead of just defining position and sizes of controls. One more question. I subscribed to Ruby-Forum mailing list but it is often flooded with Spam. Which is the official Ruby forum? Recently NetBeans has withdrawn support for Ruby. Is it worth to learn Ruby seriously and use it in commercial environment or not?

    Read the article

  • I can't get click and drag to work with my Wacom Bamboo P&T

    - by Magnus Hoff
    I get my Wacom Bamboo Pen & Touch apparently working (By using Martin Owens' PPA), but whenever I try to click and drag something -- for example to move a window -- it will only register as a click. In other words: The "button up" event is generated right after the "button down" event no matter how long I hold it in. This is the same whether I use the tip of the pen, the buttons on the pen or the buttons on the pad. However: Clicking and dragging works perfectly in the login-screen, both before logging in for the first time and after logging out.

    Read the article

  • Touchpad in Sony Vaio E14 - cannot click with a finger and drag with another - Ubuntu 12.04

    - by Nabeel
    I had the following issues with my Sony Vaio E14115's touchpad on Ubuntu 12.04: Right click not working Vertical scrolling not working Then I followed these steps to fix it: Downloaded a patch for Psmouse sudo apt-get install dkms build-essential cd ~/Desktop tar jxvf psmouse-3.2.0-24-generic-pae.tar.bz2 sudo mv psmouse-3.2.0-24-generic-pae /usr/src cd /usr/src sudo chmod -R a+rx psmouse-3.2.0-24-generic-pae sudo dkms add -m psmouse -v 3.2.0-24-generic-pae sudo dkms build -m psmouse -v 3.2.0-24-generic-pae sudo dkms install -m psmouse -v 3.2.0-24-generic-pae sudo modprobe -r psmouse sudo modprobe psmouse This fixed me the problems of Rightclick and vertical scrolling. But I still have an issue of not able to click and drag ie Clicking the leftmouse button and dragging with another finger. It doesn't move! Maybe it doesn't detect the 2nd finger. When I check the capabilities of my Synaptics touchpad by using xinput list-props "SynPS/2 Synaptics TouchPad"|grep Capabilities I get the following output: Synaptics Capabilities (304): 1, 1, 1, 1, 1, 1, 1 Please help me out.

    Read the article

< Previous Page | 5 6 7 8 9 10 11 12 13 14 15 16  | Next Page >