drag-and-drop

Find TreeViewItem to drop data

微笑、不失礼 提交于 2019-12-11 02:04:26
问题 I want to drag data from a ListView and drop it in a TreeView(the draging works fine). I use DataBinding and ItemTemplate to fill the TreeView. <TreeView ItemsSource="{Binding Groups}" Name="tvGroups" AllowDrop="True" Drop="tvDrop" DragOver="tvDragOver"> <TreeView.ItemTemplate> <HierarchicalDataTemplate ItemsSource="{Binding Participants}"> <StackPanel Orientation="Horizontal"> <TextBlock Text="{Binding Name}" /> <Button Tag="{Binding .}" Click="Button_Click_2"> <Image Source="Resources/cross

Silverlight 4 Drag and Drop Alternatives

こ雲淡風輕ζ 提交于 2019-12-11 01:53:40
问题 I want to add the ability to drag a user control from one part of a Silverlight 4 page onto another user control on the same page (not talking about the new Silverlight 4 ability to drag a file from the OS onto the page). What approach is most straightforward? What approach offers the most flexibility? Here are some alternatives I found so far SO drag-and-drop-control-for-silverlight. Same question but answers apply to SL 2. Alex van Beek's DragManager. Written for SL3. Silverlight Drag Drop.

Drag and drop without removing UIButton

前提是你 提交于 2019-12-11 01:32:38
问题 I'm implementing a drag and drop system in an iphone app. So far I managed to implement the draggable button and it is working fine. This is the code that I have: First, I assign the action to the button: [button addTarget:self action:@selector(imageMoved:withEvent:) forControlEvents:UIControlEventTouchDragInside]; then, I create the drag: - (IBAction) imageMoved:(id) sender withEvent:(UIEvent *) event { NSLog(@"moved"); CGPoint point = [[[event allTouches] anyObject] locationInView:self.view

Mouse actions not working correctly in protractor

怎甘沉沦 提交于 2019-12-11 01:27:23
问题 I am trying to upload a image. But when i am uploading, some portion of the image may get cut.So we have an option to crop that image.So i drag both side of the image and click on the upload button.So after click on upload button, it successfully uploading full portion of the image while doing it manually.When i am doing all these actions via automation script, the image is not seems to be uploaded fully,still it appears like get cut. This cropping is done in a iframe.The code i have used is

e.Data.GetDataPresent not working in WinForms drag-and-drop handler?

ε祈祈猫儿з 提交于 2019-12-11 01:26:45
问题 I'm trying to drag files into my application from a program called Locate32 (which is great by the way). Here is what happens: e.Data.GetFormats() {string[7]} [0]: "FileDrop" [1]: "FileNameW" [2]: "FileName" [3]: "FileNameMap" [4]: "FileNameMapW" [5]: "Shell IDList Array" [6]: "Shell Object Offsets" DataFormats.FileDrop "FileDrop" e.Data.GetDataPresent(DataFormats.FileDrop) false Why does e.Data.GetDataPresent(DataFormats.FileDrop) return false even though FileDrop is clearly one of the

Some mistake with drag and drop an item from listbox

瘦欲@ 提交于 2019-12-11 00:24:35
问题 I have a ListBox and I want to drag and drop Items on a rectangle. Everything was okay when I had just items instead of ItemsSource and ItemTemplate , but now it's filled from collection. Once I drop it on rectangle I want another TextBox to show value from property "protection" XAML <ListBox x:Name="listhelmets" Height="214" Width="248" ItemsSource="{Binding ListHelmets}" IsSynchronizedWithCurrentItem="True" Canvas.Left="211" Canvas.Top="72" PreviewMouseDown="helmet_MouseDown1"

kendo ui cancel treeview drop

一世执手 提交于 2019-12-11 00:17:54
问题 i have a TreeView that once the user drops the item to the desired position, it displays a dialog box and asks for confirmation, if the user selects cancel, how would i also cancel the placement of the item so it goes back to its original position? my current code is below but isnt working: var newDiv = $(document.createElement('div')); newDiv.html('Are you sure you want to move the item: ' + title); newDiv.dialog( { autoOpen: true, width: 600, buttons: { "Save": function () { $(this).dialog(

Dragging a div with jQuery causes page to be highlighted

こ雲淡風輕ζ 提交于 2019-12-10 23:57:36
问题 Please refer to my prior question here about implementing drag/drop. I got everything working fine, but now when I drag one of the list items, it also highlights practically everything on the page. With the answer from this prior question, how do I make it so it does not highlight anything while dragging? My actual code is 3 different files and is far different (much more) than the sample in the accepted answer, so I will post it only if necessary. This is using jQuery's capabilities via

The OLE way of doing drag&drop in wxPython

被刻印的时光 ゝ 提交于 2019-12-10 23:53:12
问题 I have wxPython app which is running on MS Windows and I'd like it to support drag&drop between its instances (so the user opens my app 3 times and drags data from one instance to another). The simple drag&drop in wxPython works that way: User initiates drag : The source window packs necessary data in wx.DataObject(), creates new wx.DropSource, sets its data and calls dropSource.DoDragDrop() User drops data onto target window : The drop target calls library function GetData() which transfers

Is there any way to reach drop moment in Drag and Drop?

旧街凉风 提交于 2019-12-10 23:46:59
问题 I am making a java applet that transfer files from website to my desktop with Drag and Drop.I works but,Is there any way to learn when the dropping begins?I'm using MouseListener for listining mouse acts and using my transferhandler class for transfering data. Code below like this.. public class DragApplet extends JApplet { public void init() { Container contentPane = getContentPane(); Image image = ...; JLabel label = new JLabel(new ImageIcon(image)); label.setTransferHandler(new