Search Results

Search found 5756 results on 231 pages for 'drop'.

Page 3/231 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • Paste or Drop, copy data and release source?

    - by Harvey
    I have an MFC DocView SDI App that receives data from either the clipboard or drag and drop. The data is in either CF_HDROP or CF_TEXT format. I have a COleDropTarget derived CMyDropTarget member m_dropTarget of my CMainFrame class. I have two member functions of CMyDropTarget; OnDrop(...) and OnPaste() which each call another member function PostData(pDataObject). I want to get a copy of the pDataObject from either CF_... format and PostMessage to my CmainFrame which will call a member of my Doc class. What is a simple way of getting a copy of the global data to pass with the PostMessage() so that I can get the drop source released before I get around to processing the global data? NOTE that they are always treated as a copy of the source data, so there is no need for the source to delete anything when the operation is done. Or perhaps a better way of asking the question is: How can I release the Drop source before processing the global data? Can I pass the HGLOBAL via PostMessage and still release the source without making a copy of it?

    Read the article

  • C# / WPF / .NET - Drag and drop to Desktop / Explorer

    - by Dänu
    Hey Guys Following my scenario. I got an Application which loads a Filestructure (Folders, Files) from a Database into a WPF ListView. Now I'd like to grab a file from this ListView, drag it over my Desktop (or some open explorer window) and drop it there. Basic Drag and Drop, nothing fancy. This sounds like a "standard" function for a windows application - but google won't help. So how can I achieve this? Interops? Thanks Edit: Thanks for the solution, I still had to do some googling. Here's my complete solution.

    Read the article

  • Use Dojo Drag and Drop together with Dojo Moveable

    - by Select0r
    Hi, I'm using Dojo.dnd to transfer items between to areas. The problem is: the items will snap into place once I drop them, but I'd like to have them stay where I drop them, but only for one area. Here's a little code to explain this better: <div id="dropZone" class="dropZone"> <div id="itemNodes"></div> <div id="targetZone" dojoType="dojo.dnd.Source"></div> </div> "dropZone" is a DIV that contains two dojo.dnd.Source-areas, "itemNodes" (created programmatically) and "targetZone". Items (DIVs with images) should be dragged from a simple list out of "itemNodes" into "targetZone" and stay where they are dropped. As soon as they are dragged out of "targetZone" they should snap back to the list inside "itemNodes". Here's the code I use to create the items: var nodelist = new dojo.dnd.Source("itemNodes"); {Smarty-Loop} nodelist.insertNodes(false, ['<img class="dragItem" src="{$items->info.itemtext}" alt="{$items->info.itemtext}" border="0" />']); {/Smarty-Loop} But this way I just have two lists of items, the items dropped into "targetZone" won't stay where I dropped them. I've tried a loop dojo.query(".dojoDndItem").forEach(function(node) to grab all items and change them to a "moveable"-type: using dojo.dnd.move.constrainedMoveable will change the items so they can always be moved around (even in "itemNodes") using dojo.dnd.move.boxConstrainedMoveable and defining the "box" to the borders of "targetZone" makes it possible to just move the items around inside "targetZone", but as soon as I drop them, I can't grab and move them back out So here's the question: is it possible to create two dnd.Sources where I can move items back and forth and let the items be "moveable" only in one of the sources?Or is there a workaround like making the items moveable and if they're not dropped into "targetZone" they'll be moved back to the list in "itemNodes" automatically? Once the page is submitted, I have to save the position of every item that has been placed into "targetZone". (The next step will be positioning the items inside "targetZone" on page load if the grid has already been filled before, but I'd be happy to just get the thing working in the first place.) Any hint is appreciated. Greetings, Select0r

    Read the article

  • jQuery table drag and drop plugin within iFrame

    - by Bala
    I am using the latest version (0.5) of Table Drag and Drop plugin (http://www.isocra.com/2008/02/table-drag-and-drop-jquery-plugin/) for jQuery. I have a problem when the table with the draggable rows is inside an iframe. When I drag a row and take it to the top, the page will not scroll (even after explicitly setting scrollAmount to a positive value). Scrolling works on the same table if it is not inside an iframe. Has anyone faced this problem? Has anyone figured out a solution for this?

    Read the article

  • Drag/Drop image url in IE

    - by pierre
    I have a requirement in our web app. to allow users to drag an image from an external site and drop it in a text editor they have open in our app. This is, as you'd expect, to let them embed the image in the document (its a rich text editor). In IE 8 this functionality appears to be broken. If I drag/drop, IE uses a relative URL for the 'src' tag on the image - which means I cannot then download the file and store it since I dont know the full address (eg: '../../imgs/myImage.png') Safari and Firefox do not do this; they provides the fully-qualified address (eg: www.mysite.com/imgs/myImage.png). Is this a bug in IE or just WebKit/Mozilla going the extra mile?

    Read the article

  • Dojo: drag and drop Stop Drag

    - by Jose L Martinez-Avial
    Hi, I'm trying to use Dojo dnd Source(1.4.2) to create an interface where I can move some objects from a Source to a Target. It is working fine, but I want to change the behaviour in order to execute a check before actually doing the D&D, so if the check fails, an error message is shown to the user, and the D&D is not made. I've tried the following example I found in a blog: dojo.subscribe("/dnd/drop", function(source,nodes,iscopy) { if (nodes[0].id == 'docs_menu'){ dojo.publish("/dnd/cancel"); dojo.dnd.manager().stopDrag(); alert("Drop is not permitted"); } } ); But it fails saying that this.avatar is null. Does anybody know how to do this? Thanks. Jose

    Read the article

  • C# Drag drop does not work on windows 7

    - by Oskar Kjellin
    I have had a project for quite a while using C# winforms. I implemented a drag-drop function before windows 7 was release. Worked like a charm. However, when using windows 7 it does not work. The event doesn't even get triggered. AllowDrop is set to true. When subscribing to DragEnter it does not get called in windows 7 (not sure about vista). But on XP it works all the way. The program is run with administritave priviliges. Is there any difference in the drag drop in windows 7 vs xp? Don't know if it's relevant, but I'm using x64

    Read the article

  • retain drop down value page posting back to itself asp.net

    - by d3020
    I have an aspx page that has... if (!IsPostBack) { PopulateBrand(); in the Page_Load. This PopulateBrand() simply populates my drop down. That works great and on post back it retains the value. The problem I'm having is that there is also a link on the page that is posting back some parameters to this page. What is happening is that when this is clicked it's falling through this !IsPostBack section and wiping out my drop down values that I had selected and repopulating it. How can I prevent this and just retain what I selected when this page is posting back to itself when the link is clicked? Thanks.

    Read the article

  • Silverlight 4 Drag and Drop Alternatives

    - by Eric J.
    I want to add the ability to drag a user control from one part of a Silverlight 4 page onto another user control on the same page (not talking about the new Silverlight 4 ability to drag a file from the OS onto the page). What approach is most straightforward? What approach offers the most flexibility? Here are some alternatives I found so far SO drag-and-drop-control-for-silverlight. Same question but answers apply to SL 2. Alex van Beek's DragManager. Written for SL3. Silverlight Drag Drop. Also written for SL3.

    Read the article

  • NSOutlineView with Drag and Drop

    - by bob
    I read the other post here on Outlineviews and DND, but I can't get my program to work. At the bottom of this post is a link to a zip of my project. Its very basic with only an outlineview and button. I want it to receive text files being dropped on it, but something is wrong with my code or connections. I tried following Apple's example code of their NSOutline Drag and Drop, but I'm missing something. 1 difference is my program is a document based program and their example isn't. I set the File's Owner to receive delegate actions, since that's where my code to handle drag and drop is, as well as a button action. Its probably a simple mistake, so could someone please look at it and tell me what I'm doing wrong? Here is a link to the file: http://www.4shared.com/file/or1A7aHk/OutlineDragDrop.html

    Read the article

  • can't get rid of top and bottom drop shadows

    - by Jawad
    Why with the following code, I still can't get rid of drop shadows at the top and bottom. Although the drop shadows are "small", yet still they are there. div#inner_container { width: 960px; margin: 0px auto; background-color: rgb(255, 255, 255); box-shadow: 0 9px 0px 0px transparent, 0 -9px 0px 0px transparent, 12px 0 15px -4px rgba(255, 255, 255, 0.5), -12px 0 15px -4px rgba(255, 255, 255, 0.5); position: relative; z-index: 5000; }

    Read the article

  • Wicket Drag and drop functionality for adding an image

    - by Marcel
    I'm making a wicket app that can manage some options for a cashdesk app. One of the options is to change the image of a selected Product. The user(manager) can choose from the already present images in the database (SQL) when this option is selected, or add a new image if the desired image is not present. Don't mention the test names and awesome images (it's still in test-fase) I prefer to see the adding of an image achieved by Drag and Drop html5 demo [dnd-upload] (From the desktop into the browser) I'm currently using Wicket-6.2.0 and wicket-dnd 0.5.0 and i can't seem to get this working! All examples I can find are from wicket 2.x or lower. It is possible to use drag and drop in Wicket-6.2, but how do I achieve this? There seems to be some DraggableBehavior in wicket? Any help is welcome! [UPDATE] Upgraded to wicket-dnd 0.6

    Read the article

  • C# PropertyGrid drag drop

    - by gametheoryonline
    I'm trying to implement drag/drop support to a propertygrid in C# using VS2005 (.NET 2.0). The propertygrid can handle the dragenter etc. events, but there doesn't seem to be a way to get the griditem under the pointer during a drag event. The best I've been able to get so far is to use the selectedgriditem property to retrieve a custom propertydescriptor and set the value, but this requires a grid item to already be selected before starting the drag/drop operation. Has anyone had any luck with implementing this? Thanks :-)

    Read the article

  • Memory Leak with Swing Drag and Drop

    - by tom
    I have a JFrame that accepts top-level drops of files. However after a drop has occurred, references to the frame are held indefinitely inside some Swing internal classes. I believe that disposing of the frame should release all of its resources, so what am I doing wrong? Example import java.awt.datatransfer.DataFlavor; import java.io.File; import java.util.List; import javax.swing.JFrame; import javax.swing.JLabel; import javax.swing.TransferHandler; public class DnDLeakTester extends JFrame { public static void main(String[] args) { new DnDLeakTester(); //Prevent main from returning or the jvm will exit while (true) { try { Thread.sleep(10000); } catch (InterruptedException e) { } } } public DnDLeakTester() { super("I'm leaky"); add(new JLabel("Drop stuff here")); setTransferHandler(new TransferHandler() { @Override public boolean canImport(final TransferSupport support) { return (support.isDrop() && support .isDataFlavorSupported(DataFlavor.javaFileListFlavor)); } @Override public boolean importData(final TransferSupport support) { if (!canImport(support)) { return false; } try { final List<File> files = (List<File>) support.getTransferable().getTransferData(DataFlavor.javaFileListFlavor); for (final File f : files) { System.out.println(f.getName()); } } catch (Exception e) { e.printStackTrace(); } return true; } }); setDefaultCloseOperation(DISPOSE_ON_CLOSE); pack(); setVisible(true); } } To reproduce, run the code and drop some files on the frame. Close the frame so it's disposed of. To verify the leak I take a heap dump using JConsole and analyse it with the Eclipse Memory Analysis tool. It shows that sun.awt.AppContext is holding a reference to the frame through its hashmap. It looks like TransferSupport is at fault. What am I doing wrong? Should I be asking the DnD support code to clean itself up somehow? I'm running JDK 1.6 update 19.

    Read the article

  • [WPF] Drag and drop between 2 popups

    - by timhaughton
    Our application is a WPF (4.0) AppBar docked to the top of the desktop. Various buttons in the AppBar produce Popups containing various data (in ListBoxes). I am trying to implement drag and drop of items between 2 Popups. It's pretty standard boiler plate stuff using Josh Smith's draggable ListBox that I've used half a dozen times before. Drag is initiating correctly, but the target Popup is not receiving the DragOver or Drop. Is this a focus issue? Or is there something else at work here?

    Read the article

  • HTML 5 drag-drop into wysiwyg editor in Firefox

    - by einarq
    I have a wysiwyg editor using the HTML 5 drag-drop api to allow the user to place widgets within the page they are editing. When the OnDrop event fires, I prevent the default event, and insert some html within the editor that represents the widget they inserted. I use execCommand("inserthtml", false, html) for this in Firefox. This works fine in IE, but in Firefox the html is not placed in the location where it was dropped. It always gets placed in the location where the previous selection was, which leads me to believe that cancelling the OnDrop event to override the default drop also cancels the selection change. Any ideas on how to solve this? Thanks!

    Read the article

  • jquery custom drag and drop

    - by samlochner
    I am trying to create functionality similar to drag and drop. I need to create my own as there will be some significant differences to the drag and drop in the jquery UI. I would like to have mousemove being called repeatedly at all times, and mousedown called every time the mouse is pressed. So I have the following code: $(document).bind('mousemove',function(e){ $("#coords").text("e.pageX: " + e.pageX + ", e.pageY: " + e.pageY); }); $(document).bind('mousedown',function(e){ }); ('coords' is the id of a div) As I move the mouse, coordinates are reported correctly in 'coords'. If I depress a mouse button and then move the mouse, coordinates are still reported correctly. But if I depress a mouse button on an image and then move the mouse, coordinates are reported correctly for a few sets, and then they seize up! Why is this happening and how can I fix it? Thanks, Sam

    Read the article

  • Drag and Drop ListBox for WPF

    - by drasto
    I'm looking for just a simple ListBox with build-in Drag & Drop. I think that Silverlite 4 Toolkit has something like that. The BoxList should be able to: reorder by draging & droping items drag item from one BoxList to another display preview (ghost version) of dragged item show drop location (like a line between items where the dragged will be inserted) I hope there is some solution from microsoft (in toolkit for example), but if not I all be happy with any working solution. For example I wander what control was used in DataGrid column headers reordering (by draging and droping them) implementation. Thank you for any suggestions

    Read the article

  • Preventing click event with jQuery drag and drop

    - by Sasha Yanovets
    I have an elements on page that are draggabe with jQuery. These elements have click event wich navigates to another page (ordinary links for example). What is the best way to prevent click from firing on dropping such element, while allowing clicking it in not drag and drop state? I have this problem with sortable elements, but think it is good to have solution for general drag and drop. I've solved the problem for myself. After that found that same solution exists for Scriptaculous, but maybe someone have a better way to achieve that.

    Read the article

  • Drop down select to change a second drop down select automatically

    - by zvzej
    I have a webpage where I have a form with several areas to input text and two drop down select options countries is the first one and depending in witch country is chosen the second should display the estates for that country to choose. my page connects to my db from where it gets the countries and estates.... I have a table with the country names and one table for each country estates. so all I'm trying to do is making it change the states to choose from automatically depending witch country got selected with out summiting the form since that enters a new entry to another table in my db. I seen that using javascript is the way to go but can't get it to work in my case since I don't want to be sent to another page or summit the form. here is part of my code any help will be greatly appreciated. Thanks $paissql = "SELECT * FROM Paises_table"; $paisresult = mysql_query($paissql); ?> <script language="text/javascript"> function showMe(str) { <? $estadosql = "SELECT * FROM ".str."_table"; $estadoresult = mysql_query($estadosql); ?> } </script> <TABLE BORDER="2" CELLPADDING="2" CELLSPACING="2" ALIGN="CENTER"> <form action="<?php echo $_SERVER['PHP_SELF']?>" method=POST> <TR><th> id </th> <td><?php echo $row_to_edit['id']?></td> </TR> <TR><th>Nombre:</th><td><input type="TEXT" name=Nombre value="<?php echo $row_to_edit['Id_Nombre']?>" SIZE="100"></td></TR> </td></TR> <TR><th>Pais:</th><td> <select name=Pais onchange="showMe(this.value);" > <? while($rowp = mysql_fetch_array($paisresult)) { $pais = $rowp['Name']; ?> <option value=<?php echo $pais; ?> <?php if($row_to_edit['Pais']==$pais) { echo ' selected="true"';} ?> ><?php echo $pais; ?> </option> <? } ?> </select></td></TR> <TR><th>Estado:</th><td> <select name=Estado > <? while($rowe = mysql_fetch_array($estadoresult)) { $estado = $rowe['Estado']; ?> <option value=<?php echo $estado; ?> <?php if($row_to_edit['Estado']==$estado) { echo ' selected="true"';} ?> ><?php echo $estado; ?></option> <? } ?> <TR><th>Ciudad:</th><td><input type="TEXT" name=Ciudad value="<?php echo $row_to_edit['Ciudad']?>" SIZE="100"></td></TR> <TR><th>Website:</th><td><input type="TEXT" name=website value="<?php echo $row_to_edit['website']?>" SIZE="100"></td></TR> <TR><td> </td> <td> <input type="HIDDEN" name="id" value="<?php echo $edit_id?>"> Para agregar preciona aqui: <input type="SUBMIT" name="ACTION" value="AGREGAR"> </td> </TR> </form> </TABLE> <BR> <BR>

    Read the article

  • Manual drag-drop operations in Flex

    - by Yarin
    This is a two-part problem: A) I'm implementing several irregular drag-drop operations in Flex (e.g. DataGrid ItemRenderer into Tree). My preference was modifying DragManager operations to meet my needs, and in fact using DragManager allows me to do everything I need, but I'm having serious issues with performance. For example, dragging anything over a many-columned DataGrid, whether the drag was initiated with DragManager.doDrag, or just using native ListBase drag-drop functionality, slows the drag movement to a crawl. Even if the DataGrid is disabled/ not listenening for any move/drag events, this happens. On the other hand, if the drag is initiated by calling .startDrag() on the Sprite, the drag is smooth and performs great over DataGrids and everything else. So part A would be: Is there a reason why .startDrag() operations work so well, while drags initiated through DragManager.doDrag suffer so badly when over certain components? B) If indeed the solution is to handle drag-drops using .startDrag(), how would I go about determining what component the mouse is over when the drag is released? In my example, my dragged object is brought up to the top level of the display list, and so is being moved around in stage coordinates. mouseMove, mouseOver events don't fire on the components I'm dragging over because the mouse is constantly over the dragged component, so I would need some sort of stage.coordinate - visibleComponentAtThatCoordinate conversion. Any thoughts on this? Thanks alot!-- Yarin

    Read the article

  • Drag-n-Drop on contentEditable elements

    - by Raybiez
    There are numerous WYSIWYG editors available on the internet, but I'm yet to find one that implements some form of drag-n-drop implementation. It is easy to create one's own editor, but I want to the user to be able to drag elements (ie. tokens) from outside the editable area and have them drop it at a location of their choice inside the editable area. It is easy to inject html at a specific location of an editable element, but how do one determine where the caret should be when the user is dragging a DIV over some element in the editable area. To better illustrate what I'm trying to explain, see the following scenario. The editable area (either an IFRAME in edit mode or a DIV with its contentEditable attribute set to true) already contains the following text: "Dear , please take note of ...." The user now drags an element representing some token from a list of elements, over the editable area, moving the cursor over the text until the caret appear just before the comma (,) in the text as shown above. When the user releases the mouse button at that location, HTML will be injected which could result in something like this: "Dear {UserFirstName}, please take note of ...". I do not know if anyone has ever done anything similar to this, or at least know of how one would go about doing this using JavaScript. Any help will be greatly appreciated.

    Read the article

  • JQuery-UI Drag, Drop and Re-Drag Clones on Re-Drag

    - by amarcy
    I am using the following code to extend the JQuery-UI demos included with the download. I am trying to set up a container that the user can drag items into and then move the items around within the container. I incorporated the answer from http://stackoverflow.com/questions/867469/jquery-draggable-clone which works with one problem. <script> $(document).ready(function() { $("#droppable").droppable({ accept: '.ui-widget-content', drop: function(event, ui) { if($(ui).parent(":not(:has(#id1))")){ $(this).append($(ui.helper).clone().attr("id", "id1")); } $("#id1").draggable({ containment: 'parent', }); } }); $(".ui-widget-content").draggable({helper: 'clone'}); }); </script> div class="demo"> <div id="draggable" class="ui-widget-content"> <p>Drag me around</p> </div> <div id="droppable" class="ui-widget-header"> <p>Drop here</p> </div> When an item is dropped onto the droppable container it can be dragged one time and when it is dropped after that drag it loses its dragging capability. How do I allow for the item to be dragged multiple times after it has been added to the droppable container?

    Read the article

  • Cocoa NSOutlineView and Drag-and-Drop

    - by bobthecoder
    I recently started another thread without an account, so I'm reposting the question here with an account so I can edit current links to the program so other users can follow this. I have also updated the code below. Here is my original question: I read the other post here on Outlineviews and DND, but I can't get my program to work. At the bottom of this post is a link to a zip of my project. Its very basic with only an outlineview and button. I want it to receive text files being dropped on it, but something is wrong with my code or connections. I tried following Apple's example code of their NSOutline Drag and Drop, but I'm missing something. 1 difference is my program is a document based program and their example isn't. I set the File's Owner to receive delegate actions, since that's where my code to handle drag and drop is, as well as a button action. Its probably a simple mistake, so could someone please look at it and tell me what I'm doing wrong? Here is a link to the file: http://dl.dropbox.com/u/7195844/OutlineDragDrop1.zip

    Read the article

  • drag and drop with jquery and php

    - by robertdd
    hy, i have a php array with the name of some images! i list all the images use this: $files = $_SESSION['files']; $imgid = $_POST['id']; if ($files){ foreach($files as $image ): print '<li id="liupimages">'."\n"; print '<a href="uploads/'.$image.'"><img id="'.$imgid.'" alt="'.$image.'" src="uploads/'.$image.'"></a>'."\n"; print "</li>\n"; endforeach; print <<<JS <script> $(".thumbs li a").click(function(){ var largePath = $(this).attr("href"); $('.thumbs li').removeClass('thumbac'); $(this).parent().addClass('thumbac'); $("#largeImg").hide() .attr({ src: largePath }) .load(function() { $(this).show(); }); return false; }); </script> JS; } i use jquery-ui to drag and drop images using this function: $(function() { $("#upimagesQueue").sortable({ opacity: 0.6, cursor: 'move', update: function() { //?? } }); }); after i drag and drop one image i want to be able to update the php array to! how to do this?

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >