Search Results

Search found 5422 results on 217 pages for 'drag lock'.

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

  • [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

  • JQuery drag and Drop

    - by dremay
    I wish to create an Interface to choose Multiple answers using Drag & Drop rather than CheckBox near to the answers. User can choose two types of answers (Real Answer and a Fake Answer). The User has Two Images (for Real & Fake) on the answer page. User can drag an Image and drop near to the selected answer. It is possible to change the selection by moving the "image and drop over some other answer". I have used a "div formatted with an image" near to all answers, so user can drop the image (ie fake or real image) over this "div". I have used JQuery to move the "image" and drop over the "div". Now I need add the code to the "div" (ie container used to hold the image) to identify which "image is placed over it" ie either "fake or real".

    Read the article

  • Drag N Drop utilizing simple cursor

    - by Cameron
    I'm using CommonsGuy's drag n drop example and I am basically trying to integrate it with the Android notepad example. Drag N Drop Out of the 2 different drag n drop examples i've seen they have all used a static string array where as i'm getting a list from a database and using simple cursor adapter. So my question is how to get the results from simple cursor adapter into a string array, but still have it return the row id when the list item is clicked so I can pass it to the new activity that edits the note. Here is my code: Cursor notesCursor = mDbHelper.fetchAllNotes(); startManagingCursor(notesCursor); // Create an array to specify the fields we want to display in the list (only NAME) String[] from = new String[]{WeightsDatabase.KEY_NAME}; // and an array of the fields we want to bind those fields to (in this case just text1) int[] to = new int[]{R.id.weightrows}; // Now create a simple cursor adapter and set it to display SimpleCursorAdapter notes = new SimpleCursorAdapter(this, R.layout.weights_row, notesCursor, from, to); setListAdapter(notes); And here is the code i'm trying to work that into. public class TouchListViewDemo extends ListActivity { private static String[] items={"lorem", "ipsum", "dolor", "sit", "amet", "consectetuer", "adipiscing", "elit", "morbi", "vel", "ligula", "vitae", "arcu", "aliquet", "mollis", "etiam", "vel", "erat", "placerat", "ante", "porttitor", "sodales", "pellentesque", "augue", "purus"}; private IconicAdapter adapter=null; private ArrayList<String> array=new ArrayList<String>(Arrays.asList(items)); @Override public void onCreate(Bundle icicle) { super.onCreate(icicle); setContentView(R.layout.main); adapter=new IconicAdapter(); setListAdapter(adapter); TouchListView tlv=(TouchListView)getListView(); tlv.setDropListener(onDrop); tlv.setRemoveListener(onRemove); } private TouchListView.DropListener onDrop=new TouchListView.DropListener() { @Override public void drop(int from, int to) { String item=adapter.getItem(from); adapter.remove(item); adapter.insert(item, to); } }; private TouchListView.RemoveListener onRemove=new TouchListView.RemoveListener() { @Override public void remove(int which) { adapter.remove(adapter.getItem(which)); } }; class IconicAdapter extends ArrayAdapter<String> { IconicAdapter() { super(TouchListViewDemo.this, R.layout.row2, array); } public View getView(int position, View convertView, ViewGroup parent) { View row=convertView; if (row==null) { LayoutInflater inflater=getLayoutInflater(); row=inflater.inflate(R.layout.row2, parent, false); } TextView label=(TextView)row.findViewById(R.id.label); label.setText(array.get(position)); return(row); } } } I know i'm asking for a lot, but a point in the right direction would help quite a bit! Thanks

    Read the article

  • Touch and Drag from one view to another

    - by jollyCocoa
    Hi all! I've search for some clues on this problem without much success. Hope someone can kick me in the right direction. I am prototyping a couple of apps where I need to design my own GUI. The GUI is made up by two separated UIViews where one of them contains a small thumb of an image. I want to be able to drag this thumb from the first view to the other. Simple as that! But I haven't figured out how this is done. Here is the exact flow I am looking for: touch the thumb animate a small enlargement of the thumb drag the thumb to the other UIView drop the thumb animate a shrink of the thumb Not particularly strange, but the thumb remains related to the first view all the time. I've tried to move the thumb via the first views superview and then back to the second view, but with no luck.

    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

  • Rendering Dragged object during drag

    - by marco
    Hello, I have been stuck on this problem for a while now. I want to drag a row in a jtable to reorder it. But I really want the user to see the row while dragging it and not just the default "drag" rectangle symbol. So I took a look at the java DnD tutorial finding it very useful, but.. The problem is that I still dont know which method I should override to get this going. Can somebody help me out?

    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

  • Ubuntu, trouble getting back from lock screen

    - by Navid
    My problem is that after being idle for a while, the screen is locked and after this happened I get a black screen from which I can't get rid of. I mean after black screen comes, typing and moving mouse does not bring any new screen, and even alt+ctrl+F1 to F7 changes nothing. All I can do is to restart the system. Can anybody help me with this?

    Read the article

  • How to disable Windows 8 lock screen?

    - by Filip
    So I took a plunge and installed Windows 8 Consumer Preview on my main home PC. So far so good, but there is one annoyance - the system "locks" the computer after a period of inactivity causing me to re-enter my password. I really would like to avoid this, but have no idea how. I already tried the power settings (no pass on wake up) and the screen saver settings with no luck. Is this some sort of bug, or am I missing something? P.S. In this case I favor convenience over security.

    Read the article

  • Lock Windows keyboard and mouse but still display screen normally

    - by Stephen Lacy
    I'm using windows 7, I have a dual monitor display. It displays important information related to the business, I'd rather that random users that walk in can't just walk over to it and start using the computer with the same access rights as the user the monitoring software is running as. What I would like is if any time someone presses a button on the keyboard including alt-ctrl-delete all that would appear is a dialog asking for a password. Then I can click cancel and it will return to showing the data I want displayed. ClearLock doesn't work I tried it btw

    Read the article

  • Difference Between Monitor & Lock?

    - by Goober
    What's the difference between a monitor and a lock? If a lock is simply an implementation of mutual exclusion, then is a monitor simply a way of making use of the waiting time inbetween method executions? A good explanation would be really helpful thanks.... regards

    Read the article

  • [PHP] Read and write to a file while keeping lock

    - by Znarkus
    Hi! I am making a simple page load counter by storing the current count in a file. This is how I want to do this: Lock the file Read the current count Increment it Write new count Unlock file/close it Can this be done? As I understand it, the file can't be written to without losing the lock. The only way I have come up with to tackle this, is to write a character using "r+" mode, and then counting characters.

    Read the article

  • Ubuntu 13.10 japanese keyboard layout intercepts Caps Lock

    - by Envek
    I've installed Ubuntu 13.10 (clean install on new machine), there are lot of changes for configuring keyboard layouts and I've tried to configure it as I've used earlier: Englis (US), Russian and Japanese (Anthy) with switching between them with Caps Lock key. (See screenshot) Caps Lock switching works fine between Russian and English and vice-versa, but with Japanese I can switch only TO Japanese (not FROM), in Japanese layout Caps Lock starting to work as usual Caps Lock (as a switch between small and BIG letters), so I need to use mouse to switch back to Ru or En layout. This happens ONLY with Japanese layouts (I've tried also simply "Japanese" and "Japanese (Kana)"), not with Chinese, Korean or anything else. I'm not sure who is blame for that, is it ibus-anthy or anything. Please help, I want to use Caps Lock to switch between all layouts. Also, I've created a bug in the LaunchPad: https://bugs.launchpad.net/ubuntu/+source/gnome-control-center/+bug/1247363

    Read the article

  • Looking for a lock-free RT-safe single-reader single-writer structure

    - by moala
    Hi, I'm looking for a lock-free design conforming to these requisites: a single writer writes into a structure and a single reader reads from this structure (this structure exists already and is safe for simultaneous read/write) but at some time, the structure needs to be changed by the writer, which then initialises, switches and writes into a new structure (of the same type but with new content) and at the next time the reader reads, it switches to this new structure (if the writer multiply switches to a new lock-free structure, the reader discards these structures, ignoring their data). The structures must be reused, i.e. no heap memory allocation/free is allowed during write/read/switch operation, for RT purposes. I have currently implemented a ringbuffer containing multiple instances of these structures; but this implementation suffers from the fact that when the writer has used all the structures present in the ringbuffer, there is no more place to change from structure... But the rest of the ringbuffer contains some data which don't have to be read by the reader but can't be re-used by the writer. As a consequence, the ringbuffer does not fit this purpose. Any idea (name or pseudo-implementation) of a lock-free design? Thanks for having considered this problem.

    Read the article

  • Rails running multiple delayed_job - lock tables

    - by pepernik
    Hey. I use delayed_job for background processing. I have 8 CPU server, MySQL and I start 7 delayed_job processes RAILS_ENV=production script/delayed_job -n 7 start Q1: I'm wondering is it possible that 2 or more delayed_job processes start processing the same process (the same record-row in the database delayed_jobs). I checked the code of the delayed_job plugin but can not find the lock directive in a way it should be. I think each process should lock the database table before executing an UPDATE on lock_by column. They lock the record simply by updating the locked_by field (UPDATE delayed_jobs SET locked_by...). Is that really enough? No locking needed? Why? I know that UPDATE has higher priority than SELECT but I think this does not have the effect in this case. My understanding of the multy-threaded situation is: Process1: Get waiting job X. [OK] Process2: Get waiting jobs X. [OK] Process1: Update locked_by field. [OK] Process2: Update locked_by field. [OK] Process1: Get waiting job X. [Already processed] Process2: Get waiting jobs X. [Already processed] I think in some cases more jobs can get the same information and can start processing the same process. Q2: Is 7 delayed_jobs a good number for 8CPU server? Why yes/not. Thx 10x!

    Read the article

  • lock shared data using c#

    - by menacheb
    Hi, I have a program (C#) with a list of tests to do. Also, I have two thread. one to add task into the list, and one to read and remove from it the performed tasks. I'm using the 'lock' function each time one of the threads want to access to the list. Another thing I want to do is, if the list is empty, the thread who need to read from the list will sleep. and wake up when the first thread add a task to the list. Here is the code I wrote: ... List<String> myList = new List(); Thread writeThread, readThread; writeThread = new Thread(write); writeThread.Start(); readThraed = new Thread(read); readThread.Start(); ... private void write() { while(...) { ... lock(myList) { myList.Add(...); } ... if (!readThread.IsAlive) { readThraed = new Thread(read); readThread.Start(); } ... } ... } private void read() { bool noMoreTasks = false; while (!noMoreTasks) { lock (MyList)//syncronize with the ADD func. { if (dataFromClientList.Count > 0) { String task = myList.First(); myList.Remove(task); } else { noMoreTasks = true; } } ... } readThread.Abort(); } Apparently I did it wrong, and it's not performed as expected (The readTread does't read from the list). Does anyone know what is my problem, and how to make it right? Many thanks,

    Read the article

  • Drag String data from My Cocoa App to Third-Party Cocoa App

    - by Woodster
    Hello, I want to drag a row from my tableview and drop it into any other NSTextField in Mac OS X 10.6, and have a string of text be dropped. Drag and drop already works within my app (between a NSTableView and an NSBrowser), but I have had no success putting any data on the pasteboard that can accepted by apps other than the source application. Here's the code I tried, which I thought would be enough to get hte word "hello" to be 'pasted' when I drop into some other NSTextField: -(BOOL) tableView:(NSTableView *)tableView writeRowsWithIndexes:(NSIndexSet *)rowIndexes toPasteboard:(NSPasteboard *)pboard { [pboard declareTypes:[NSArray arrayWithObject:NSStringPboardType] owner:self]; [pboard setString:@"hello" forType:NSStringPboardType]; return YES; } //-- I never get the cursor that shows me the drop will be accepted, and it just doesn't work. Things I've tried: Using the 10.5 version of the Pasteboard identifier, NSStringPBoardType Using the 10.6 version, NSPasteboardTypeString. Setting the owner = nil, since I'm not providing the data lazily. Using the keyed archiver: [pboard setData:[NSKeyedArchiver archivedRootObject:@"Hello!!"]] None of the above have worked. I think I have the concepts correct: "Encode data, tell the pasteboard what you've got, then give it the data", but since other apps don't recognize it, I suspect I'm not telling the pasteboard the correct datatype. Where am I going wrong? Thanks, Woody

    Read the article

  • How to use drag and drop within a UIScrollView

    - by user249488
    I am trying to drag and drop UIViews within a UIScrollView. I'd like the UIScrollView to scroll if I drag a UIView so that it intersects the top or bottom of the ScrollView. If it touches the top, it should scroll up. If it touches the bottom, it should scroll down. Once the UIView is moved such that it is no longer intersecting the top or bottom, the scrolling should stop. The first approach I tried was to start an NSTimer whenever I detected that the UIView intersected with the top or bottom of the scrollview. The timer would scroll the UIScrollView bit by bit until it was invalidated. This resulted in very jerky scrolling, since there is no way to predict when the timers will fire. My current approach is to simply scroll all the way to the top or bottom of the ScrollView, like this: [UIView beginAnimations:nil context:NULL]; [UIView setAnimationCurve:UIViewAnimationCurveEaseInOut]; [UIView setAnimationDuration:1.0]; [self.parentScrollview setContentOffset:newOffset animated:NO]; [UIView commitAnimations]; In order to stop scrolling, I try to determine the position of the touch in the touchesMoved: delegate, and use that to calculate the contentOffset to use for the scrollView. The problem is, when I try to get the location in the view via [[touches anyObject] locationInView:self], I get the final end location, rather than the current location. I'm guessing that's because the contentOffset on the scrollView is set immediately. Is there a way to get the actual location of a touch in a situation like this? Or any other way to set the contentOffset when I interrupt the scrolling animation?

    Read the article

  • NSCollectionView subclass doesn't call drawRect during drag session despite setNeedsDisplay

    - by Alain Vitry
    Greetings, I am puzzled as to how and when drawRect is supposed to be called in a NSCollectionView subclass. I implement drag and drop operation in order to move NSCollectionViewItems within the collection, and would like to draw a visual indication of where the drop would end. The subclass does not call drawRect during the drag session. (It does during scroll) Is this the intended operation ? Any hint on how to implement this behavior properly are welcome. A full xcode project of the following code is available at: http://babouk.ovh.org/dload/MyCollectionView.zip Best regards Code sample: @interface CollectionViewAppDelegate : NSObject <NSApplicationDelegate> { NSWindow *window; NSMutableArray *collectionContent; } /* properties declaration */ /* KVC compliance declarations */ @end @interface MyCollectionView : NSCollectionView @end @interface ItemModel { NSString *name; } @property (copy) NSString *name; @end @implementation MyCollectionView - (void)drawRect:(NSRect)rect { NSLog(@"DrawRect"); } - (void)mouseDragged:(NSEvent *)aEvent { NSPoint localPoint = [self convertPoint:[aEvent locationInWindow] fromView:nil]; [self dragImage:[NSImage imageNamed:@"Move.png"] at:localPoint offset:NSZeroSize event:aEvent pasteboard:nil source:self slideBack:NO]; } - (BOOL)prepareForDragOperation:(id < NSDraggingInfo >)sender { return YES; } - (NSDragOperation)draggingEntered:(id <NSDraggingInfo>)sender { return NSDragOperationEvery; } - (NSDragOperation)draggingUpdated:(id <NSDraggingInfo>)sender { [self setNeedsDisplay:YES]; return NSDragOperationEvery; } - (NSDragOperation)draggingSourceOperationMaskForLocal:(BOOL)isLocal { return NSDragOperationEvery; } - (void)mouseDown:(NSEvent *)theEvent { } @end @implementation CollectionViewAppDelegate @synthesize window, collectionContent, collectionView; - (void)applicationDidFinishLaunching:(NSNotification *)aNotification { NSMutableArray *data = [[NSMutableArray alloc] init]; /* Fill in data */ [self setCollectionContent:data]; [data release]; } /* dealloc */ /* KVC implementation */ @end @implementation ItemModel @synthesize name; /* dealloc */ @end

    Read the article

  • jQuery Drag/Drop problem: mousemove Event not binding for some elements

    - by saturdayplace
    Using the latest jQuery/UI that are hosted at Google. I've got the following markup: <ul id="tree"> <li><a href="1/">One</a></li> <li><a href="2/">Two</a></li> </ul> And the following javascript: $(document).ready(function(){ // Droppable callbacks function dragOver(overEvent, ui_object) { $(this).mousemove(function(moveEvent){ console.log("moved over", this); }); } function drop_deactivate() { $(this).unbind(); } function drag_out() { $(this).unbind(); } // Actual dragging $("#treeContainer li").draggable({ revert: true, revertDuration: 0 }); // Actuall dropping $("a").droppable({ tolerance: "pointer", over: dragOver, deactivate: drop_deactivate, out: drag_out }); }); If I drag the first li down over the second, the mousemove function fires (and firebug logs the output). But if I drag the second li up over the first, the mousemove function doesn't fire. You can see this live at http://jsbin.com/ivala. Is there a reason for this? Should I be trapping the mousemove event in some other way? Edit: It appears as thought the mousemove() event isn't binding for earlier elements than the one currently being dragged (should be bound upon their mouseover).

    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

  • 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

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