Search Results

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

Page 13/95 | < Previous Page | 9 10 11 12 13 14 15 16 17 18 19 20  | Next Page >

  • Smoothly drag a Sprite in cocos2d - iPhone

    - by Saurabh
    Hi All I have implemented a drag on a sprite object as follows.. -(BOOL)ccTouchesMoved:(NSSet *)touches withEvent:(UIEvent *)event { UITouch * touch = [touches anyObject]; CGPoint location = [[Director sharedDirector] convertCoordinate: [touch locationInView:touch.view]]; [diskSprite setPosition:ccp(location.x , location.y )]; return kEventHandled; } but this dragging is not smooth..... when i drag fast with my thumb the object left from the path. Thanks

    Read the article

  • Raphael Scope Drag n drop multiple paper instances

    - by donald
    I have two Raphael paper instances. In both I want to drag and drop an element (circle). It is important for me to assign both these circles the same id. I expected no problem, as both are in different paper instances and therefore in different scope. What happens is, that somehow both elements react, when I have clicked both elements at least once. If I however give these elements different IDs everything works fine (each element only calls its "start", "drag" and "up" function if draged around). Is this intended behaviour of Raphael and do I have to assign different IDs to the elements in the different paper instances? Hopefully not and you can point me to the right direction :-) Thanks a lot for your Help in advance, Here comes the code: <!doctype html> <html> <head> <meta charset="utf-8" /> <title>DragNDrop</title> <script src="raphael-min.js"></script> </head> <body> <h1>Paper1</h1> <div id="divPaper1" style ="height: 150px; width: 300px; border:thin solid red"></div> <h1>Paper2</h1> <div id="divPaper2" style ="height: 150px; width: 300px; border:thin solid red"></div> <script> start1 = function () { console.log("start1"); } drag1 = function () { console.log("move1"); } up1 = function () { console.log("up1"); } start2 = function () { console.log("start2"); } drag2 = function () { console.log("move2"); } up2 = function () { console.log("up2"); } var paper1 = Raphael("divPaper1", "100%", "100%"); var circle1 = paper1.circle(40, 40, 30); circle1.attr("fill", "yellow"); circle1.id = "circle"; //both circles get the same id circle1.drag(drag1, start1, up1); paper2 = Raphael("divPaper2", "100%", "100%"); var circle2 = paper2.circle(40, 40, 30); circle2.attr("fill", "red"); circle2.id = "circle"; //both circles get the same id circle2.drag(drag2, start2, up2); </script> </body>

    Read the article

  • WPF: ListBox click and drag selects other items

    - by Bodekaer
    Hi, Simple question: 1) I click and hold the mouse on a ListBoxItem in a ListBox. 2) Now I drag the mouse cursor down over the next ListBoxItem in the list It now selects this new item. I would like to disable this. So the user has to click an item to select it. Not just drag over it. I have Single selection turned on. Any ideas are greatly appreciated :)

    Read the article

  • Drag & Drop Shapes on Canvas

    - by user242408
    Hi, I put several shapes (like Ellipse and Rectangle) on a Canvas. Now, I want user to be able to drag & drop these shapes. Is there some predefined functionality that I can use, or I should implement the drag & drop myself using the mouse events ? Thanks !

    Read the article

  • event capturing or bubbling

    - by ChampionChris
    I have a link button in a repeater control. the li element is drag and droppable using jquery. when the page loads the the link button works perfectly, the jquery that is attached and the server side code both execute. when I perform a drag and drop then click on the link button it doesn't not fire. when i click it a second time it does fire. If i perform 2 or drag and drops in a row the link button doesn't fire a as many drag and drops as i before it will fire. for example if if perform 3 drag and drops then it will take about 3 click before the events are fired. <asp:Repeater ID="rTracks" runat="server" OnItemDataBound="rTracks_ItemDataBound" EnableViewState="true"> <ItemTemplate> <li onclick="testclick();" class='admin-song ui-selectee <asp:Literal id="ltStatusClass" runat="server" />' mediaid="<%# Eval("MediaId") %>" artistid="<%# Eval("tbMedia.tbArtists.id") %>"><span class="handle"><strong> <%--<%# int.Parse(DataBinder.Eval(Container, "ItemIndex", "")) + 1%>--%><%# Eval("SortNumber")%></strong><%--0:03--%></span> <span class="play"><span class="btn-play">&nbsp;</span></span> <span class="track" title="<%# Eval("tbMedia.Title") %>"> <%# Eval("tbMedia.Title") %></span> <span class="artist"> <%# Eval("tbMedia.tbArtists.Name") %></span> <span class="time" length="<%# Eval("tbMedia.Length") %>"> <asp:Literal ID="ltRuntime" runat="server" /></span> <span class="notes"><span class="btn-notes"> <asp:Literal ID="ltNotesCount" runat="server" /></span></span> <span class="status"> <asp:Literal ID="ltStatus" runat="server" /></span> <span class="date"> <%# Eval("DateAdded") %></span> <span class="remove"><asp:LinkButton ID="lbStatusClass2" runat="server" CssClass="btn-del" OnClick="UpdateStatus" ValidationGroup='<%#Bind("MediaId") %>'> <%--<span class='<asp:Literal id="ltStatusClass2" runat="server" Text="btn-del" />'>--%> &nbsp;<%--</span>--%></asp:LinkButton></span></span> </li> </ItemTemplate> </asp:Repeater> I have onclick event on the li element, when the mouse is clicks the link button the li onclick event is fired even when linkbutton event doesnt fire. My question is if the li captures the event y doesnt the event fire on the linkbutton? What would be stopping the event?

    Read the article

  • Can't drag files from Explorer into Notepad++ running as administrator on Windows 8

    - by Luke Foreman
    If I have Notepad++ running as administrator, I can't drag files from explorer on to it (they are rejected with the 'stop' cursor) and if I try to use the explorer extension right click 'Edit with Notepad++' it throws an error. Opening the files using the Notepad++ 'Open' dialog, or even double clicking them in Explorer works as it should. (Note double clicking is not a solution as very few of the files I want to open are default to Notepad++) I have UAC set to 'never notify'. Using the hack where UAC 'admin approval mode' is disabled fixes the issue, but kills the ability to use Metro apps.

    Read the article

  • Drag and drop to attachments feature only working intermittently in Outlook 2010

    - by Jared275
    I've been trying to troubleshoot a problem with my Outlook 2010 install where the ability to drag and drop an attachment into a new email will stop working from time to time. It seems to be fairly moonphase-y in that I can't seem to find a correlation in what causes it to stop working. Some searching online lead me to try running this command through the windows run dialogue: Regsvr32 ole32.dll, which apparently re-registers that particular dll as a command component in the registry. It didn't work, but I was curious as to why it was a suggested fix, and if there was something similar to try that would work, or another known solution.

    Read the article

  • Word table copy/drag formulae like Excel

    - by tumchaaditya
    I am inserting formulae into a word table to get subtotals for rows and columns and a grand total. My problem is, I have got large number of rows and I don't want to enter the formulae manually in each cell. I cannot use =SUM(LEFT) because the subtotal does not have all the columns. So, is there any way to drag the formulae like we do in excel(bottom right corner of selected cell)? I cannot send the table to excel and copy it back because it would ruin the formatting which took a lot of my time.

    Read the article

  • Emulating Windows Photo Viewer image dragging in c#

    - by murasaki5
    Hi, i'm trying to emulate how image is being dragged inside the windows photo viewer when it is large. The problem is, i don't how to drag the image while keeping it intact in the form's edges. If you're observing windows photo viewer, when you drag the image downward for instance the image moves and stops when the top end of the image is visible, but in my app, it continues to move since i don't know how to check when to stop it. Any idea please?

    Read the article

  • Dragging a div along with all of its child divs

    - by roygbiv
    I have the following code: <body> <div id="container" style="position:absolute; left:0px; top:0px; z-index:1;"> <div id="div1" style="background-color:Red; position:absolute; left:0px; top:0px; width:256px; height:256px; z-index:0;" >&nbsp;</div> <div id="div2" style="background-color:Black; position:absolute; left:256px; top:0px; width:256px; height:256px; z-index:0;" >&nbsp;</div> <div id="div3" style="background-color:Green; position:absolute; left:512px; top:0px; width:256px; height:256px; z-index:0;" >&nbsp;</div> <div id="div4" style="background-color:Yellow; position:absolute; left:768px; top:0px; width:256px; height:256px; z-index:0;" >&nbsp;</div> <div id="div5" style="background-color:Blue; position:absolute; left:1024px; top:0px; width:256px; height:256px; z-index:0;" >&nbsp;</div> </div> <script type="text/javascript"> <!-- SET_DHTML("container"); //--> </script> </body> I want to drag the 'container' div such that all child divs are dragged at the same time. I can drag individual divs, but that is not what I want. Can a div drag child divs or do they have to be images? I am using the WalterZorn drag drop API, but am open to using any API, script or whatever.

    Read the article

  • jQuery Draggable and overflow issue

    - by Phill Duffy
    I am having an undesired effect when I drag a div from a container div which is set as overflow: scroll. I have found an example of someone else where they have had the issue but I have been unable to find a resolution Example on Paste bin What happens is that the scroll is just increased, I can see why this would be the desired behaviour if you wanted to drag to a destination within the scrollable div but I want to be able to take it outside of its scrolling grasp. Thanks, Phill

    Read the article

  • Javascript: Make Rows Draggable Through Input Field Handles

    - by Corey O.
    I have created a table with draggable rows. Unfortunately, most of the rows are covered with a large textbox input element. In order to drag the rows, you have to grab the row on the very edge just outside of the textbox. Is there a way to allow the rows to be grabbed through the textboxes without destroying the textbox functionality? (i.e. relay the mouse drag event, but not the mouseclick event?)

    Read the article

  • Getting the id of child element based on the parents class name

    - by sea_1987
    I am currently playing around with jqueries drag and drop, basically I currently have a div (.drag_check) that holds a checkbox, I have the drag and drop working but I want to alert out the checkbox's ID once the element is dropped, I assume I have to use child but all my attempts have returned 'undefined'. Below is my code, $('.drag_check').draggable({ containment: 'document', opacity:0.6, revert: 'invalid', helper: 'clone', zIndex: 100 }); $("ul.searchPage").droppable({ drop: function(e, ui) { var param = $(ui.draggable).attr('class') addlist(param) alert(param) } })

    Read the article

  • Drag and drop rectangle in C#

    - by sama
    I want to know how to draw rectangle in C# and make it dragged and dropped in the page here my code to draw it but I cannot drag or drop it. public partial class Form1 : Form { public bool drag = false; int cur_x, cur_y; Rectangle rec = new Rectangle(10, 10, 100, 100); public Form1() { InitializeComponent(); } protected override void OnPaint(PaintEventArgs r) { base.OnPaint(r); Graphics g = r.Graphics; //g.DrawRectangle(Pens.Black, rec); g.FillRectangle(Brushes.Aquamarine, rec); } private void recmousedown(object sender, MouseEventArgs m) { if (m.Button != MouseButtons.Left) return; rec = new Rectangle(m.X, m.Y,100,100); drag = true; cur_x = m.X; cur_y = m.Y; } private void recmousemove(object sender, MouseEventArgs m) { if (m.Button != MouseButtons.Left) return; rec.X = m.X; rec.Y = m.Y; Invalidate(); } }

    Read the article

  • Strange behaviour using Drag and Drop in word 2003 automation in headers

    - by Oliver Hanappi
    Hi! I am developing a template based addin for Word 2003 which allows the user to drag and drop elements from a listbox into the word document. Unfortunately I'm getting a really strange behaviour when trying to drop elements in the document's header. Open the template and type something in the header Close the header and insert some content on the page Add a page break. Switch to page layout mode where and set zoom level to "Two Pages" Open the header Slowly Drag and Drop an list item from the list box to the header. See multiple Page Setups dialogs occur which cause Word to crash. Here is my code: // in ThisDocument.cs public MyUserControl _control; public void Init() { _control = new MyUserControl(); ActionsPane.Controls.Add(_control); ActionsPane.Visible = true; } // in MyUserControl.cs public void listBox1_MouseDown(object sender, MouseEventArgs e) { DoDragDrop("something", DragDropEffects.Copy); } Have I done somethinkg wrong with implementing Drag and Drop? Is there a workaround for this strange behaviour? Thanks in advance, Oliver Hanappi

    Read the article

  • NSTableView Drag and Drop not working

    - by macatomy
    Hi, I'm trying to set up very basic drag and drop for my NSTableView. The table view has a single column (with a custom cell). The column is bound to an NSArrayController, and the array controller's content array is bound to an NSArray on my controller object. The data displays fine in the table. I connected the dataSource and delegate outlets of the table view to my controller object, and then implemented these methods: - (BOOL)tableView:(NSTableView *)aTableView writeRowsWithIndexes:(NSIndexSet *)rowIndexes toPasteboard:(NSPasteboard *)pboard { NSLog(@"dragging"); return YES; } - (NSDragOperation)tableView:(NSTableView*)tv validateDrop:(id <NSDraggingInfo>)info proposedRow:(NSInteger)row proposedDropOperation:(NSTableViewDropOperation)op { return NSDragOperationEvery; } - (BOOL)tableView:(NSTableView *)aTableView acceptDrop:(id <NSDraggingInfo>)info row:(NSInteger)row dropOperation:(NSTableViewDropOperation)operation { return YES; } I also registered the drag types in -awakeFromNib: #define MyDragType @"MyDragType" - (void)awakeFromNib { [super awakeFromNib]; [_myTable registerForDraggedTypes:[NSArray arrayWithObjects:MyDragType, nil]]; } The problem is that the -tableView:writeRowsWithIndexes:toPasteboard: method is never called. I've looked at a bunch of examples and I can't figure out anything I'm doing wrong. Could the problem be that I'm using a custom cell? Is there something I'm supposed to override in the cell subclass to enable this functionality? EDIT: Confirmed. Switching the custom cell for a regular NSTextFieldCell made dragging work. Now, how do I make drag and drop work with my custom cell?

    Read the article

  • Drag and drop not working while using JQuery UI dialog

    - by user327854
    Hi Guys ! I m using jquery ui.core.js with version 1.7.2 and jquery-1.4.2.js . I got the issue saying "proto.plugins"(query ui.core.js for draggable module) is undefined ,hence i am not able to perform the drag option.My Code is given below. $("#linkfortag").click(function(){ var $dialog=$("<div id='testing'></div>").dialog({autoOpen:false}); $dialog.dialog("destroy"); $dialog.draggable(); alert("$dialog is" + $dialog.html()); $dialog.dialog('open'); $dialog.dialog({title:'Add Tag',resizable:true,closeOnEscape:true,modal:true,minWidth:250,buttons:{ 'Add Tag':function() { alert($(this).children().children().children(':input').attr('value')); var value=$("#addTag").attr('value'); var formobj=$(this).children(); validate_usertagform(value); } ,'Cancel': function() {$(this).dialog('close');}}}); $dialog.bind("dialogbeforeclose",function(event,ui){ alert("Dialog is gng to close"); alert("<<<<<<<<<<<<<<<<<UI IS>>>>>>>>>>>>>>>>>>>>>>" + ui); }); $dialog.bind("drag",function(event,ui){ alert("<<<<<<<<<<<<<<<<<drag is>>>>>>>>>>>>>" + event); }); $dialog.dialog( "option", "closeText", '' ); $dialog.dialog("option","draggable",true); }); Please help me on this........

    Read the article

  • SWT Drag and Drop support for Text widget

    - by bryantsai
    I've written an application recently using SWT. In one of its dialog box, I have a few widgets, one of which is Text, which is designed to support DND with other widgets. I've first added DND support for the 2 Tree widgets on the same dialog box (both drag source and drop target). Before I added DND support for that Text widget, I noticed that on Linux platform (gtk), SWT Text widget automatically get drag and drop support. That is, I can already drag from the other Tree widgets and drop on this Text (at any position to inserted there), as well as selecting and dragging any text from this Text to other Tree or Text widget. However, this is only working on Linux platform but not on Windows. The same program, if running on Windows, will not have any DND support for that Text widget (Tree widgets of course have DND support since I specifically write for them). So here's what I want to achieve on Windows as well: drop text at any position in Text widget. before dropping and while hovering, able to see the caret position clearly where the intended position to drop. caret position should move along with the mouse cursor. support multi-line in Text widget SOLUTION: DropTarget target = new DropTarget(sytledText, DND.DROP_MOVE | DND.DROP_COPY); target.setTransfer(new Transfer[] { TextTransfer.getInstance() }); target.addDropListener(new StyleTextDropTargetEffect(sytledText)); Use StyledText instead of Text widget Use StyledTextDropTargetEffect (or extend it) and add it as dr op listener

    Read the article

  • Explorer forgetting how to cut and paste files

    - by raimesh
    My Windows XP (SP3) machine (at work) occasionally "forgets" how to cut-and-paste files in Explorer - if I cut or copy a file then go to paste it elsewhere, the "paste" and "paste shortcut" menu items are greyed out. The keyboard shortcuts (Ctrl+X/Ctrl+C,Ctrl+V) don't work either, and neither does Drag-and-Drop - clicking and dragging a file/folder doesn't change the pointer and letting go doesn't drop the item anywhere. Restarting the explorer.exe process usually fixes the problem, but sometimes I need to do a full reboot. Note: this may be related to the following existing question, although that's Vista and it sounds like the asker has more permanent problems than I do: http://superuser.com/questions/27045/copy-paste-in-vista-explorer-broken-not-ms-vpc So, any idea what might be causing the problem and how to avoid it?

    Read the article

  • Explorer forgetting how to cut and paste files

    - by raimesh
    My Windows XP (SP3) machine (at work) occasionally "forgets" how to cut-and-paste files in Explorer - if I cut or copy a file then go to paste it elsewhere, the "paste" and "paste shortcut" menu items are greyed out. The keyboard shortcuts (Ctrl+X/Ctrl+C,Ctrl+V) don't work either, and neither does Drag-and-Drop - clicking and dragging a file/folder doesn't change the pointer and letting go doesn't drop the item anywhere. Restarting the explorer.exe process usually fixes the problem, but sometimes I need to do a full reboot. Note: this may be related to the following existing question, although that's Vista and it sounds like the asker has more permanent problems than I do: http://superuser.com/questions/27045/copy-paste-in-vista-explorer-broken-not-ms-vpc So, any idea what might be causing the problem and how to avoid it?

    Read the article

< Previous Page | 9 10 11 12 13 14 15 16 17 18 19 20  | Next Page >