drag-and-drop

Drag and Drop with cwac-touchlist

血红的双手。 提交于 2019-12-13 07:15:42
问题 I have two questions. 1. How to make app remember new order in ListView what I made with drag and drop. Like now I can reorder items but every time I open app, I have to reorder items again. 2. My app should open different webpage from each item. But when I reorder items then web links doesn't reorder. They stick on same. Like example: I have items Google and Yahoo! so links are "http://google.com" and "http://yahoo.com". Then I reorder item: Google was top but I drag Yahoo to top. After that

HTML5 File API always returns DataURI of [object file]. What am I doing wrong?

风流意气都作罢 提交于 2019-12-13 07:02:51
问题 Today I have been attempting to make a thumbnail up loader which uses drag and drop and the file API. I feel as if i have got reasonably far. But the DataURI that is provided to be the source in my image file ALWAYS returns as [object file] and therefore doesn't show the image. Any help?! Thanks. Danny (below is my code) <!DOCTYPE html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Untitled Document</title> <style> #thumbnailPreview { width:149px; height

drag and drop - the elements don't drop

柔情痞子 提交于 2019-12-13 05:36:26
问题 i'm making a drag and drop quiz here's the full code <!doctype html> <html> <head> <title>A jQuery Drag-and-Drop quiz</title> <link rel="stylesheet" type="text/css" href="style.css"> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.5.0/jquery.min.js"></script> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.9/jquery-ui.min.js"></script> <script type="text/javascript"> var correctCards = 0; $( init ); function init() { //

WPF drag on canvas with preview

那年仲夏 提交于 2019-12-13 05:18:34
问题 I have Canvas binded with ObsarvableCollection: <ItemsControl ItemsSource="{Binding Path=MapElements}"> <ItemsControl.ItemsPanel> <ItemsPanelTemplate> <Canvas Width="{Binding ElementName=mapWidth, Path=Text}" Height="{Binding ElementName=mapHeight, Path=Text}" Background="WhiteSmoke" AllowDrop="True" Margin="10,10,10,10" ClipToBounds="True" Drop="Mapa_Drop_1" DragOver="Mapa_DragOver_1" DragEnter="Mapa_DragEnter_1" Name="Mapa"> </Canvas> </ItemsPanelTemplate> </ItemsControl.ItemsPanel>

Implementing Drag and Drop similar

一笑奈何 提交于 2019-12-13 05:14:25
问题 [Situation] I have a custom userControl (Basicly a iamge with some text beneath it). In my program I add two of these and implement a drag method by public partial class CustomItem : UserControl { private bool IsDragging { get; set; } private Point clickPosition; public CustomItem() { InitializeComponent(); this.DataContext = this; this.MouseLeftButtonDown += (s, ea) => { clickPosition = ea.GetPosition(this.LayoutRoot); this.CaptureMouse(); IsDragging = true; }; this.MouseMove += (s, ea) => {

Update UI when adding to observable collection

巧了我就是萌 提交于 2019-12-13 04:38:20
问题 iv'e got 2 itemscontrols bound to 2 observable collections my ItemsControls : <ItemsControl Grid.Column="4" Name="Pipe19" ItemsSource="{Binding Path=Pipes[19].Checkers}" Style="{StaticResource ItemsControlStyle}" ItemsPanel="{StaticResource TopPipePanelTemplate}" /> <ItemsControl Grid.Column="5" Name="Pipe18" ItemsSource="{Binding Path=Pipes[18].Checkers}" Style="{StaticResource ItemsControlStyle}" ItemsPanel="{StaticResource TopPipePanelTemplate}" /> their definitions through style : <Style

iOS drag and drop to another view with subclass

一个人想着一个人 提交于 2019-12-13 04:36:13
问题 I have a RootViewController with a UIScrollView (boardScrollView). This has a UIImageView as subview to create a board (boardImage). I can zoom in and out, works fine. Also scrolling works fine! Now, I want to drag & drop other UIImageViews (Tiles) into and out of the ScrollView. I have subclassed UIImageView to TileImageView and overridden methods touchesBegan, touchesMoved and touchesEnded. The drag & drop works fine on the superview. But I want to be able to drop the Tiles on the

Detecting a DragDrop onto a TreeView item

我与影子孤独终老i 提交于 2019-12-13 04:33:08
问题 I am doing a drag drop from one user control onto a different TreeView. However, how can I detect the drop into the tree view item? I can detect if there is a drop into the TreeView, but thats not the item. I can do an TreeViewItem.Drop event, but thats for when I drop an Item inside the TreeView, not from another control. I tried seeing the TreeView to be focused, however, that did not solve it. I can detect DragEnter/Leave on the TreeView and it's Items, but not the drop. I have taken a

Google maps api v3 Two markers one fixed one dragged

心已入冬 提交于 2019-12-13 04:24:06
问题 I'm using two markers for getting distances A and B The Javascript: var rendererOptions = { draggable: true }; var Mapa = { // HTML Nodes mapContainer: document.getElementById('mapa'), dirContainer: document.getElementById('trasa'), fromInput: document.getElementById('from-input'), toInput: document.getElementById('to-input'), travelModeInput: document.getElementById('travel-mode-input'), unitInput: document.getElementById('unit-input'), // API Objects dirService: new google.maps

Drag and Drop in Java - Painting more than just a border

风流意气都作罢 提交于 2019-12-13 04:17:50
问题 I have a JTable and a JList and I have my code set up so that I can drag from the JTable to the JList using built in Swing methods. When I drag from the JTable to the JList, the "image" that is dragged is simply a border of the thing I am dragging. Specifically, in the case of the source being a JTable, the image is just a border of the row I selected to drag. How can I override what this "image" is? How can I get it so that the user can drag text, not just a border (rectangle)? 回答1: You