Search Results

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

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

  • Mimicking the UltraGridColumnChooser's drag & drop ability

    - by Sören Kuklau
    (Infragistics 2008 Vol. 3, CLR 2.0) Infragistics's UltraGrid comes with a column chooser user control, which is simply a vertical arrangement of columns with checkboxes that toggle a column's hidden state. In addition, it allows you to pick a column and drag it directly to the grid so you don't have to manually position it afterwards. (This is particularly handy when you already have a lot of visible columns and have no clue where the new one ended up.) I'm building my own column chooser based on an UltraTree. Getting the checkboxes to behave the same wasn't an issue, but I haven't found a way to drag a column from the tree to the grid and have it accept it. In my tree, each UltraTreeNode has a Tag with the following struct: Private Structure DraggableGridColumn Public NodeKey As String Public NodeName As String Public ParentKey As String Public Column As UltraGridColumn End Structure I then have an event as follows: Private Sub columnsTree_SelectionDragStart(ByVal sender As Object, ByVal e As System.EventArgs) Handles columnsTree.SelectionDragStart If columnsTree.SelectedNodes.Count <> 1 Then Return End If If Not TypeOf columnsTree.SelectedNodes(0).Tag Is DraggableGridColumn Then Return End If Dim column As UltraGridColumn = CType(columnsTree.SelectedNodes(0).Tag, DraggableGridColumn).Column columnsTree.DoDragDrop(column, DragDropEffects.All) End Sub In the DoDragDrop call, neither column (of type UltraGridColumn) nor column.Header (of type ColumnHeader) get accepted by the grid. I assume I'm sending the wrong type, and/or that the grid expects a special struct with some additional information. Unfortunately, I've also failed to catch an event (both on the column chooser side as well as on the grid side) where Infragistics's normal column chooser does this properly; the normal drag & drop events never seem to fire.

    Read the article

  • Flex - Drag and drop - Drop a subset of multiple items

    - by flanagann
    I'm developing two DataGrid with drag and drop support. Multiple items can be selected from the source data grid, and dropped into the target data grid. I'm using an drag and drop event listener which completes the operation only in certain cases. I'm using event.preventDefault() but it doesn't work, since it stops the drag and drop from all the items. My aim is, for example, finally dropping 2 elements from the total 4 elements that I previously selected. public function onDropPermission(event:DragEvent):void { var sourceGrid:mx.controls.DataGrid = new mx.controls.DataGrid(); sourceGrid = event.dragInitiator as mx.controls.DataGrid; var targetGrid:mx.controls.DataGrid = new mx.controls.DataGrid(); targetGrid = event.target as mx.controls.DataGrid; var i:int; for (i = 0; i < sourceGrid.selectedIndices.length; i++) { var j:int; for (j = 0; j < dataGroupPermissions.length; j++) { var permission:Permission = new Permission; permission = dataGroupPermissions[j] as Permission; if (permission.id == sourceGrid.selectedItems[i].id) { event.preventDefault(); } } } }

    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

  • WPF TreeView drag and drop using preview

    - by imekon
    I'm handling drag and drop events in a TreeView using PreviewMouseDown, PreviewMouseMove and PreviewMouseUp, however, there is an issue. In my PreviewMouseDown handler, I set everything ready in case there's a drag started (detected in the Move event), however I set e.Handled = true. This means that standard selection events don't get generated on my tree! What I want to be able to do in my Up event is to invoke the standard treeview selection changed event - except I cannot call events outside of the tree. So what's the correct way to do this? I have tried using the standard MouseDown, MouseMove and MouseUp events however there's an issue with messing up my multiple selection feature that means I need to use the Preview version of those events.

    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

  • 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

  • How can I drag and drop a xaml activity to a WF4 rehosted designer?

    - by Louis Rhys
    I understand that the WorkflowDesigner can receive a dragged item in several ways, for example: By dragging an item from the toolbox and dropping it on the designer: an empty activity of that type will be inserted on the designer at the drop location. One can also drag an activity from the designer and drop it on another location in the designer, the dragged activity will be inserted at the drop location as well. Is it possible that similar to these two drag and drop mechanism, I can drag a xaml activity to the designer? What I have in mind is this, Let's say you have a ListView containing several xaml files. I want to be able to drag one of the ListView items (ie one of the xaml files), and when I drag it over the designer it will act as if I drag something from the toolbox (except the activity will be supplied from the xaml). I know I can create a runtime Activity from the file by using ActivityXamlServices.Load(filename), and I want this activity to be inserted at the drop location. But how to tell the application to understand this when I drag and drop?

    Read the article

  • WPF - Drag from withing DataTemplate

    - by Gustavo Cavalcanti
    I have a ListBox displaying employees with a DataTemplate - it looks very similar to this screenshot. I want to be able to click on the employee photo, drag it and drop it somewhere out of the ListBox. How can I do that? I am not sure how to capture the PreviewMouseLeftButtonDown event of the Image, since it's inside the DataTemplate. Edit: The DataTemplate lives in a separate assembly and the drag/drop logic needs to be in the Window that has the ListBox. Edit2: I am thinking that the right way of doing this is using commands, am I right? Thanks!

    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

  • Drag and Drop text - What am I missing?

    - by Harvey
    I am trying to add drag-and-drop text to my Doc-View App. I added the COleDropTarget variable to the view class, registered it in OnCreate(). I added OnDragEnter(), OnDragOver(), OnDragLeave() and OnDrop() to that class as virtual overrides, but none of them are ever called. I previously had added m_pMainWnd-DragAcceptFiles(TRUE); to my App class. I tried commenting out that statement, but no affect. I tried using Spy++ to see where the messages go while I do a drag, but it logs nothing at all while I am dragging the text around in the App. What do I need? Or what else can I try, to narrow down the problem? TIA, Harvey

    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

  • disable text drag and drop

    - by maniek
    There is a common feature of modern browsers where a user can select some text and drag it to an input field. Within the same field it causes moving of text, between different fields it does copying. How do I disable that? If there is no portable way, I am mostly interested in firefox. This is an intranet webapp, so I am also interested in modifying the browser/getting a plugin to do this. Maybe some system-level settings (I`m on windows XP)? I need to keep the default select-copy-paste functionality. The background is I have multiple-field data entry forms, and users often drag something by mistake.

    Read the article

  • WPF Drag and Drop - Get original source info from DragEventArgs

    - by Quinn351
    I am trying write Drag and Drop functionality using MVVM which will allow me to drag PersonModel objects from one ListView to another. This is almost working but I need to be able to get the ItemsSource of the source ListView from the DragEventArgs which I cant figure out how to do. private void OnHandleDrop(DragEventArgs e) { if (e.Data != null && e.Data.GetDataPresent("myFormat")) { var person = e.Data.GetData("myFormat") as PersonModel; //Gets the ItemsSource of the source ListView .. //Gets the ItemsSource of the target ListView and Adds the person to it ((ObservableCollection<PersonModel>)(((ListView)e.Source).ItemsSource)).Add(person); } } Any help would be greatly appreciated. Thanks!

    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

  • 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

  • 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

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