Search Results

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

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

  • WPF DataGrid does not scoll on drag

    - by Greg R
    I have a strange problem with a WPF DataGrid from WPF Toolkit. The scrollbars appear correctly when the number of rows grows, and the scrolling works when you press up or down arrows on the scrollbar. The problem comes in when I try to drag the scrollbar on the datagrid. My page has a scroll viewer around it. When I click and drag the scrollbar on the grid, it scrolls the page scroller instead. If the scrollbar does not apear on the page, there grid still does not scroll. Is there a workaround for this??? Would really appreciate some help with this issue! For example, in this case if the page is < 280, it scrolls on drag. But drag scrolling does not work on the grid. <ScrollViewer ScrollViewer.IsDeferredScrollingEnabled="True" HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto" > <DockPanel> <dg:DataGrid HorizontalScrollBarVisibility="Auto" SelectionMode="Single" CanUserAddRows="False" CanUserDeleteRows="False" CanUserResizeColumns="False" CanUserSortColumns="False" AutoGenerateColumns="False" RowHeaderWidth="17" ItemsSource="{Binding Path=OrderSearchVm}" IsReadOnly="True" MaxHeight="280" DockPanel.Dock="Top"> <dg:DataGrid.Columns> <dg:DataGridTextColumn Width="75" Header="Date" Binding="{Binding Path=OrderDate}" > <dg:DataGridTextColumn.ElementStyle> <Style TargetType="{x:Type TextBlock}"> <Setter Property="TextWrapping" Value="Wrap" /> </Style> </dg:DataGridTextColumn.ElementStyle> </dg:DataGridTextColumn> <dg:DataGridTextColumn Header="Type" Binding="{Binding Path=OrderType}" Width="45"/> <dg:DataGridTextColumn Header="Shipping Name" Binding="{Binding Path=ShipToName}" Width="115"> <dg:DataGridTextColumn.ElementStyle> <Style TargetType="{x:Type TextBlock}"> <Setter Property="TextWrapping" Value="Wrap" /> </Style> </dg:DataGridTextColumn.ElementStyle> </dg:DataGridTextColumn> <dg:DataGridTextColumn Header="Shipping Address " Binding="{Binding Path=ShipToAddress}" Width="160"> <dg:DataGridTextColumn.ElementStyle> <Style TargetType="{x:Type TextBlock}"> <Setter Property="TextWrapping" Value="Wrap" /> </Style> </dg:DataGridTextColumn.ElementStyle> </dg:DataGridTextColumn> <dg:DataGridTextColumn Header="E-Mail" Binding="{Binding Path=Email}" Width="140"> <dg:DataGridTextColumn.ElementStyle> <Style TargetType="{x:Type TextBlock}"> <Setter Property="TextWrapping" Value="Wrap" /> </Style> </dg:DataGridTextColumn.ElementStyle> </dg:DataGridTextColumn> </dg:DataGrid.Columns> </dg:DataGrid> </DockPanel> </ScrollViewer>

    Read the article

  • Silverlight Toolkit ListBoxDragTarget Only One Way

    - by Tom Allen
    I've got a Silverlight 3 app that has two ListBoxes that I need to be able to drag items between. I've got the toolkit control working so that I can drag from ListBox lbA to ListBox lbB but i then can't drag the item from lbB back to lbA. <toolkit:ListBoxDragDropTarget mswindows:DragDrop.AllowDrop="True"> <ListBox x:Name="lbA" Style="{StaticResource ListBoxStyle}"> <ListBox.ItemTemplate> <DataTemplate> <TextBlock Text="{Binding DisplayMember}"/> </DataTemplate> </ListBox.ItemTemplate> </ListBox> </toolkit:ListBoxDragDropTarget> <toolkit:ListBoxDragDropTarget mswindows:DragDrop.AllowDrop="True"> <ListBox x:Name="lbB" Style="{StaticResource ListBoxStyle}" Width="350"> <ListBox.ItemTemplate> <DataTemplate> <TextBlock Text="{Binding DisplayMember}"/> </DataTemplate> </ListBox.ItemTemplate> </ListBox> </toolkit:ListBoxDragDropTarget> I'm binding lbA to an ObservableCollection of MyObject items which is a parent class for objects MyObjectA and MyObjectB (and there is a mix of ChildObjectA and ChildObjectB items). Is the one way behaviour I'm seeing due to binding to a collection MyObjects or something else i'm missing?

    Read the article

  • How To AutoScroll a DataGridView during Drag and Drop

    - by Mason
    One of the forms in my C# .NET application has multiple DataGridViews that implement drag and drop to move the rows around. The drag and drop mostly works right, but I've been having a hard time getting the DataGridViews to AutoScroll - when a row is dragged near the top or bottom of the box, to scroll it in that direction. So far, I've tried implementing a version of this solution. I have a ScrollingGridView class inheriting from DataGridView that implements the described timer, and according to the debugger, the timer is firing appropriately, but the timer code: SendMessage(Handle, WM_VSCROLL, (IntPtr)scrollDirectionInt, IntPtr.Zero); doesn't do anything as far as I can tell, possibly because I have multiple DataGridViews in the form. I also tried modifying the AutoScrollOffset property, but that didn't do anything either. Investigation of the DataGridView and ScrollBar classes doesn't seem to suggest any other commands or functions that will actually make the DataGridView scroll. Can anyone help me with a function that will actually scroll the DataGridView, or some other way to solve the problem?

    Read the article

  • ContentEditable DIV - disabling drag and drop

    - by sonofdelphi
    Is it possible to disable the drag-and-drop functionality on elements which have the contentEditable attribute set to true. I have the following HTML page. <!DOCTYPE html> <html><meta charset="utf-8"><head><title>ContentEditable</title></head> <body> <div contenteditable="true">This is editable content</div> <span>This is not editable content</span> <img src="bookmark.png" title="Click to do foo" onclick= "foo()"> </span> </body> </html> The main problem I'm facing is that it is possible to drag and drop the image into the DIV and it gets copied (along with the title and the click handler)

    Read the article

  • Custom calendar drag drop event: Find date dropped to

    - by cpf
    Hi stackoverflow, I've been working in silverlight to do a date-oriented application. I started off with changing the calendar template to contain a listbox on every date, and I created a listbox containing simple items. I implemented an easy drag drop on both those elements, so now I can drag from the listbox containing the items to the listbox on a date and have an event. Downside is: In the event, I don't know which date it was dropped to. How can I figure this out? Please note: The date dropped to is not necessarily the date currently selected...

    Read the article

  • Drag big picture in small layer?

    - by Tronic
    Hi, I need a plugin for jquery or another js framework, where I can define a small div where i can drag around a big picture, so i get only a clipping of the picture. any ideas? edit: i try to explain i have a small div, like 600px x 450px. this div behaves like a clipping window for a big picture with like 3000px x 2000px. so i only see a specific cutout of the big picture. and i need to drag that big picture around in this small clipping window! c

    Read the article

  • Flex Drag & Drop: Detecting when all data has been moved from source to destination

    - by Adam Tuttle
    I have two mx:TileList controls that I'm using to allow editing of objects in batch. The first contains a collection of all available data, and the 2nd contains the current batch. Both are bound to ArrayCollections, and using the native drag-n-drop functionality of the TileList control the data is moved from one ArrayCollection to the other when an object is dragged between them. I need to change the currentState to show & reset the batch manipulation controls when the batch count goes from 0 to n or n to 0 items. Based on the documentation, I would have thought that I should listen to the dragComplete event, but my testing shows that instead of firing after the data has been removed from the source ArrayCollection and added to the destination ArrayCollection, it fires (consistently) between these two actions. Both lists are similar to this: <mx:TileList id="srcList" dragEnabled="true" dropEnabled="true" dragMoveEnabled="true" dataProvider="{images}" dragComplete="handleDragComplete(event)" allowMultipleSelection="true" /> And here's the source of the handleDragComplete function: private function handleDragComplete(e:DragEvent):void{ trace(e.dragInitiator.name + '.dragComplete: batch.length=' + batch.length.toString()); trace(e.dragInitiator.name + '.dragComplete: images.length=' + images.length.toString()); if (batch.length > 0){ currentState = 'show'; }else{ currentState = ''; } } And lastly, here's some example output from running the code. These are all run one after the other. Case 1: The application loads with 10 objects in the first list and the batch is empty. I dragged 1 object from the source list to the batch list. srcList.dragComplete: batch.length=1 srcList.dragComplete: images.length=10 (Expected: 1,9) Clearly, the object has been added to the batch ArrayCollection but not removed from the source. Case 2: Now, I'll drag a 2nd object into the batch. srcList.dragComplete: batch.length=2 srcList.dragComplete: images.length=9 (Expected: 2,8) Firstly, we can see that images.length has changed, showing that the object that I dragged from the source list to the batch list was removed AFTER the dragComplete event fired. The same thing happens this time: The new object is added to the batch ArrayCollection (batch.length=2), the dragComplete event fires (running these traces), and then the object is removed from the source ArrayCollection. Case 3: Now, I'll drag both images from the batch list back to their original location in the source list. batchList.dragComplete: batch.length=2 batchList.dragComplete: images.length=10 (Expected: 0,10) We can see that batch.length hasn't gone down, but the source images array is back at its original length of 10. QUESTION: Am I doing something wrong? Is there another event I could listen for? (Note: I tried both DragExit and DragDrop, just to be sure, and those behave as expected, but are not what I need.) Or is there another way to get the data that I want? Or... have I found a bug in the SDK?

    Read the article

  • jQuery offset combined with jQuery UI doesn't update on drag

    - by Constructor
    I need to get the offset of the element that is being dragged and I use: $(function(){ $(".draggable").draggable({ stop: function(){ var offset = $("#boxone").offset(); alert(offset.left); } }); }); the element is positioned absolute and has a CSS of: left:100px; that is the value I get on the alert when I drag the element (even multiple times). What I want is to get it to alert the current offset (if I drag in 200px to the right it should say 300)

    Read the article

  • Drag and Drop Multiple select boxes

    - by Roland
    I have two multiple select boxes. I need to use JQuery to drag selected items from one combobox to the next. Is this at all possible? I need to drag items from this box <select id="select1" multiple=multiple> <option value="1">test1</option> <option value="2">test2</option> <option value="3">test3</option> </select> to this box <select id="select2" multiple=multiple> <option value="4">test4</option> </select> Any pointers help will be appreciated

    Read the article

  • HTML5 drag upload in new window

    - by user463604
    I have setup an HTML5 drag and drop upload into my site. The problem that I have is when a user is uploading a large file, they must wait for the upload to finish before navigating and using the rest of the site. So, what I'd like to do is allow the user to drag files to the main site and then have it automatically open a new window and start the upload there so they can still use the rest of the site while the upload is happening. Anyone have and advice on how to accomplish this or if it can even be done?

    Read the article

  • DragDrop registration did not succeed in Setup Project

    - by rodnower
    Hello, we have some installation project in Visual Studio solution (Other project types - Setup and deployment - Setup project). This project have other library type project with Installation class named InstallationCore like project output. In user action I call to Install and Uninstall functions of installer of InstallationCore. InstallationCore has windows forms for interaction with user. There, in forms, I use Drag and Drop functionality for Drag and Drop text from Tree View to Text Box. But in line: txbUserName.AllowDrop = true; I get error of JIT debugger: Unhandled exception has occured DragDrop registration did not succeed System.InvalidOperationException: DragDrop registration did not succeed And long stack trace after that. Important to say, that when I run Installer function from test project the error did not occur and all work fine. Error occurs only when I run the .msi package. Any suggestions? Thank you for ahead.

    Read the article

  • How can I get jQuery UI's Draggable and Sortable functions to work on the iPhone?

    - by Damovisa
    I have a page that uses JQuery UI; in particular the Sortable interaction. The page works fine for desktop web browsers with mice, however I can't get the drag-drop functionality to work on Mobile Safari on the iPhone. Any dragging action simply scrolls the page. The functionality on my page is extremely similar to the Sortable Empty-Lists demo on the JQuery UI site. This page also doesn't work on the iPhone. Is there any way to get the drag-drop functions working on the iPhone?

    Read the article

  • Android: chronometer widget and layout() method could not work well at the same time

    - by Lennard
    I write a test android app, in which there are only two views, a chronometer and a imageview. Using the layout() method of the imageview to dynamically change the position of it, I wish to implement drag-and-drop effect. It does work. However, each time the chronometer ticks, the imageview is always reverted to its original position, which seems that the whole screen is reloaded from the layout xml. So, does anybody know how to prevent the imageview from reverting to the original place, and let chronometer and drag-and-drop effect coexist? Thx

    Read the article

  • Mouseup not working after mousemove on img

    - by leyou
    I'm trying to do a simple drag script. The idea is to save the position when the mouse is down, update the view while the mouse is moving, and stop when mouse is up. Problem, mouseup event isn't working properly. See the code: var target = $('a') var pos = 0; var dragging = false; $(document).mousedown(function(e) { pos=e.pageX; dragging = true }) $(document).mouseup(function() { dragging = false }) $(document).mousemove(function(e) { if(dragging){ target.css('left', e.pageX-pos); } }) ? Why mouseup works with a "a" tag: http://jsfiddle.net/leyou/c3TrG/1/ And why mouseup doesn't work with a "img" tag: http://jsfiddle.net/leyou/eNwzv/ Just try to drag them horizontally. Same probleme on ie9, ff and chrome.

    Read the article

  • pyqt QTreeWidget setItemWidget dissapears after drag/drop

    - by mleep
    I'm trying to keep a widget put into a QTreeWidgetItem after a reparent (drag and drop) using QTreeWidget.setItemWidget() But the result, if you compile the following code - is that the widget inside the QTreeWidgetItem disappears. Any idea why? What code would fix this (repopulate the QTreeWidgetItem with the widget I guess?) from PyQt4.QtCore import * from PyQt4.QtGui import * class InlineEditor (QWidget): _MUTE = 'MUTE' def __init__ (self, parent): QWidget.__init__ (self, parent) self.setAutoFillBackground (True) lo = QHBoxLayout() lo.setSpacing(4) self._cbFoo = QComboBox() for x in ["ABC", "DEF", "GHI", "JKL"]: self._cbFoo.addItem(x) self._leBar = QLineEdit('', self) lo.addWidget (self._cbFoo, 3) lo.addSpacing (5) lo.addWidget (QLabel ( 'Bar:')) lo.addWidget (self._leBar, 3) lo.addStretch (5) self.setLayout (lo) class Form (QDialog): def __init__(self,parent=None): QDialog.__init__(self, parent) grid = QGridLayout () tree = QTreeWidget () # Here is the issue? tree.setDragDropMode(QAbstractItemView.InternalMove) tree.setColumnCount(3) for n in range (2): i = QTreeWidgetItem (tree) # create QTreeWidget the sub i i.setText (0, "first" + str (n)) # set the text of the first 0 i.setText (1, "second") for m in range (2): j = QTreeWidgetItem(i) j.setText (0, "child first" + str (m)) #b1 = QCheckBox("push me 0", tree) # this wont work w/ drag by itself either #tree.setItemWidget (tree.topLevelItem(0).child(1), 1, b1) item = InlineEditor(tree) # deal with a combination of multiple controls tree.setItemWidget(tree.topLevelItem(0).child(1), 1, item) grid.addWidget (tree) self.setLayout (grid) app = QApplication ([]) form = Form () form.show () app.exec_ ()

    Read the article

  • Drag Panel Extender in Ajax?

    - by Surya sasidhar
    hi, i am working on dragpanel extender i write the code for drag panel, it is coming nice but when i drag the panel it going back to the same position where it is initially. This is my code... Untitled Page <style type="text/css"> .outerPanel { border: solid 1px #C0C0C0; background-color: #e1e1e1; width: 200px; height: 300px; z-index:20; padding: 2px; } .dragPanel { border: solid 1px #FFFFFF; background-color: #C0C0C0; width: 194px; height: 15px; color: #FFFFFF; font-weight:bold; padding: 2px; cursor: move; } function setBodyHeightToContentHeight() { document.body.style.height = Math.max(document.documentElement.scrollHeight, document.body.scrollHeight) + "px"; } setBodyHeightToContentHeight(); // Uncomment the line below if you are having problem while resizing the browser window. window.attachEvent('onresize', setBodyHeightToContentHeight); <asp:Panel ID="Panel1" runat="server" CssClass="outerPanel"> <asp:Panel ID="Panel2" runat="server" CssClass="dragPanel"> <b>Dragable Panel</b> </asp:Panel> <p> Surya Sasidhar surya sasidhar Surya Sasidhar surya sasidhar Surya sasidhar surya sasidhar </p> <cc1:DragPanelExtender ID="DragPanelExtender1" TargetControlID="Panel1" DragHandleID ="Panel2" runat="server"> </cc1:DragPanelExtender> </div> </form> and it is ging some javascript error like object required

    Read the article

  • How to move/drag multiple images with CALayer???

    - by gbf.sara
    I have more than 10 images in screen and i want to move each image using CALayer concept. While am trying to move first image,its working. Even when i drag my second image also, its working. But after that when i get back to first image and when i try to move , am struck up. its not working. I dono where it went wrong. Here's ma code //Assigning Layer to UIImage// layer = [CALayer layer]; UIImage *image1 = [UIImage imageNamed:[NSString stringWithFormat:@"%@_thumb.png",[tiv imageName]]]; layer.contents = (id)image1.CGImage; layer.position=CGPointMake(200,200); layer.frame = CGRectMake(110, 180, 100, 100); [self.view.layer addSublayer:layer]; [layer needsDisplay]; [self.view.layer needsDisplay]; [layer needsLayout]; //Here i try to move my image// - (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event { [super touchesMoved:touches withEvent:event]; NSArray *allTouches = [touches allObjects]; int count = [allTouches count]; if (count == 1) { if (CGRectContainsPoint([layer frame], [[allTouches objectAtIndex:0] locationInView:self.view])) { layer.position = [[allTouches objectAtIndex:0] locationInView:self.view]; return; } } if (count > 1) { if (CGRectContainsPoint([layer frame], [[allTouches objectAtIndex:-1] locationInView:self.view])) { layer.position = [[allTouches objectAtIndex:0] locationInView:self.view]; return; } } } Also ive planned to use single CALayer for multiple images.. When i click an image, it should be placed in that CALayer and when i click another, the same CALayer should take the latter one. So tat whenever i drag an image it should move(no matter how many images r there) . Do u think this concept will work out or is there any other idea??? My concept may seems to be a basic one. Am new to this environment n so kindly help me..

    Read the article

  • Drag/drop problem (draggable in position:relative parent)

    - by MackDaddy
    Here's the scenario, I'm using prototype and scriptaculous, but I believe jquery would have the same issue. I have a list draggable images in a relatively positioned div. The problem is I can't drag the images out of the parent div... well... you can, they're just not visible. If you remove the position:relative on the parent div, it works just fine, I can drag items out of the div perfectly. However because of this little IE7 bug: http://snook.ca/archives/html%5Fand%5Fcss/position%5Frelative%5Foverflow%5Fie/ that position:relative is required. IS there another work around to this bug that does not require setting position? I've tried playing with z-index and everything I can think of to no avail. Here's the CSS for the box: #products{ width: 680px; height: 400px; border: 1px solid gray; /*background-color: #66FF00;*/ overflow-y: scroll; overflow-x: hidden; font-family:"Helvetica Neue","Helvetica"; font-size:12px; font-weight:bold; position: relative; } If you would like to see this bug in action, you can visit it here: http://twinmed-dev.com/template%5Fadd.php. Try searching for an item like "gloves" then adding it to the cart below. Thanks for any help.

    Read the article

  • Implementing Drag and Drop using MouseListener for custom Components

    - by Chris Lieb
    I am working on a school assignment that requires me to be able to pick up a tile, drag it to a location, then drop it there. I was able to get this working using TransferHandler and a bunch of stuff from the dnd package, but this is not an acceptable way to perform this action for this assignment according to the professor. So, I am trying to achieve the same effect using the MouseListener interface. The basic setup is this: I have a JPanel-derived class called LocationView that contains JLabel-dervived instances of TileView. I need to get events that give me the LocationView that has the mouse pressed on and the LocationView that has the mouse released on. I am proxying mouse events through the TileView to its containing LocationView so that I can properly handle the mousePressed event. I added System.out.println()'s to the mouse listeners for mousePressed and mouseReleased to both LocationView and TileView so that I could observe the events that were being generated. To my surprise, pressing the mouse on Tile A in Location A, then dragging to Location B and releasing would generate a mouse released event for both Tile A and Location A, but not for Location B. I need the mouse released event triggered for only Location B. To try to work around this, I tried implementing a glass pane based off of the FinalGlassPane found at http://weblogs.java.net/blog/2006/09/20/well-behaved-glasspane. After adding the glass pane and adding an event listener for it, I can see that the mouse events are indeed filtering through the glass pane, but the mouse released event is still only being called on the item the mouse was clicked on. Is there a way to have mousePressed and mouseReleased events associated with the same drag action be called on separate components?

    Read the article

  • Clicking the mouse down to drag objects on Mac

    - by Uri
    I've been using the following code to issue clicks programmatically on a Mac void PostMouseEvent(CGMouseButton button, CGEventType type, const CGPoint point) { CGEventRef theEvent = CGEventCreateMouseEvent(NULL, type, point, button); CGEventSetType(theEvent, type); CGEventPost(kCGHIDEventTap, theEvent); CFRelease(theEvent); } void Click(const CGPoint point) { PostMouseEvent(kCGMouseButtonLeft, kCGEventMouseMoved, point); NSLog(@"Click!"); PostMouseEvent(kCGMouseButtonLeft, kCGEventLeftMouseDown, point); PostMouseEvent(kCGMouseButtonLeft, kCGEventLeftMouseUp, point); } Now, I'm trying to click down to be able to drag objects, like a scroll bar or an application's window. I'm using the following: PostMouseEvent(kCGMouseButtonLeft, kCGEventMouseMoved, point); NSLog(@"Click Down!"); PostMouseEvent(kCGMouseButtonLeft, kCGEventLeftMouseDown, point); When i ran the code above something interesting will happen, when the left mouse down is issue nothing seem to happen, I move my mouse and the window doesn't move, however when I added a mouse up event then the window jumped to the location where I supposedly dragged it. this is sort of OK, however, how do I can make the mouse click down and drag an object? Note: I do have a whole method to see when the mouse stopped moving so I can click up. please post code. Thanks

    Read the article

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