drag-and-drop

Angular 4 - Component selector not working in custom directive

ε祈祈猫儿з 提交于 2019-12-11 08:52:09
问题 I am working with HTML 5 drag and drop in Angular 4. I created two custom attributes directive to handle drag and drop events. Everything works fine except when i am trying to drag a component selector i expected it should be converted to HTML elements. But component selector itself there - <div><ang-textfield></ang-textfield></div> I implemented ang-textfield component selector and also added to app.module declarations Here are two directives - @Directive({ selector: '[dragTextField]' })

How do I make an ExtJS drag and drop tree be copy only — not remove items from the display?

自古美人都是妖i 提交于 2019-12-11 08:46:46
问题 I've created a tree using the treeviewdragdrop plugin like this: Ext.create('Ext.tree.Panel', { viewConfig: { plugins: { ptype: 'treeviewdragdrop' }, listeners: { drop: function (... do stuff By default if you drag an item from one parent to another it moves it and you can ctrl-click to copy, but I just want to copy -- that is, I don't want it to stop displaying in the original node. I'm not doing anything in the drop to affect the store, so I'm not forcing a remove 回答1: Oh, this was easy.

Capture DragDrop Event of RichTextBox C#

独自空忆成欢 提交于 2019-12-11 08:38:24
问题 I have a custom RichTextBox Control derived from RichTextBox Control that Windows provides. I am unable to capture the dragDrop Event though the DragEnter event is getting captured, but I dont know why the dragDrop event is not. I have following properties set as true: EnableAutoDragDrop=true; AllowDrop=true; What am I missing ?? 回答1: Daniel is probably correct here: private void DragOver(object sender, System.Windows.Forms.DragEventArgs e) { if (!e.Data.GetDataPresent(typeof(System.String)))

Dragging a row from one jquery Datatable and dropping it into another Datatable

安稳与你 提交于 2019-12-11 08:33:58
问题 Iam trying to drag a row or a group of rows from one jquery Datatable and drop it into another Datatable . oTable = $("#dragtable").dataTable({ "aaData": app_emp, "bProcessing": true, "bDestroy": true, "aoColumns": [{ "mDataProp": "employeeId" }, { "mDataProp": "empName" }] }).rowReordering(); Iam getting the json from ajax call and populating the datatable as above.The row reordering feature is working and Iam able to drag and drop the rows in the same datatable $("#dragtable ").draggable({

Unable to drag drop items between bound itemscontrols

自作多情 提交于 2019-12-11 08:23:08
问题 iv'e got several bound itemscontrols which all play the role of of drop target i need to be able to drag drop items between these items controls . the problem is that the items control's are not recognized as drop targets by the drag drop framework The ItemsControl Panel : <ItemsPanelTemplate x:Key="TopPipePanelTemplate"> <StackPanel></StackPanel> </ItemsPanelTemplate> The DataTemplate : <DataTemplate x:Key="PipeDataItem" > <Ellipse Width="45" Height="45" Fill="{Binding IsMine,Converter=

Dojo Drag-Drop Issue: Sorting items in target DND container

左心房为你撑大大i 提交于 2019-12-11 08:20:28
问题 My JavaScript code is as below //I have a Json: var jsonRoles = {"roles": [ {"roleId": "1", "roleName": "role1", "roleDesc": "This is role1"}, {"roleId": "2", "roleName": "role2", "roleDesc": "This is role2"}, {"roleId": "3", "roleName": "role3", "roleDesc": "This is role3"} ] }; //To get the all role name listed in DND container i used the for loop: var results=""; for(var i=0;i<jsonRoles.roles.length;i++){ results += '<div class="dojoDndItem">' + jsonRoles.roles[i].roleName + '</div>'; } /

drag n drop between two tables

对着背影说爱祢 提交于 2019-12-11 08:12:21
问题 I m trying to drag n drop rows between two tables. First table has 3 columns and the second table has 4 columns. I have the drag n drop working. All the examples I have seen generally appendTo at the dropped location. What I would like to do is replace the contents of the dragged row and replace/update the cells in the dropped location. I was thinking if I can maybe write a new tablerow( ..) and then remove the current dropped row and replace it with the generated row. Or maybe just update

ng2-dragula with a virtual scroll

て烟熏妆下的殇ゞ 提交于 2019-12-11 08:07:12
问题 I am trying to implement ngx-virtual-scroll and ng2-dragula together here is my current Stackblitz UPDATED : Stackblitz The problem is the following : <virtual-scroller #scroll2 [id]="myGroupId" [dragula]="myGroupId" [(dragulaModel)]="myList.list2" [items]="myList.list2" class="virtual-scroller"> <div class="virtual-scroller-element" *ngFor="let card of myList.list2; let i = index ">{{myList.list2[i]}}</div> </virtual-scroller> for Dragula to work, there must be no HTML in between the group

Qt Drop event not firing

人走茶凉 提交于 2019-12-11 07:55:34
问题 Drop event will not happen, although `setAcceptDrops' has been called. The following code is based on a widget project created with Qt 5.12.0. After adding in dropEvent() function the cpp file becomes #include "mainwindow.h" #include "ui_mainwindow.h" #include <QDebug> // added MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWindow) { ui->setupUi(this); setAcceptDrops(true); // added } MainWindow::~MainWindow() { delete ui; } // added; in .h it is in `protected:'

how to drag and drop a word from a textbox into another at a particular location in c#

妖精的绣舞 提交于 2019-12-11 07:53:03
问题 I have a slight problem when it comes to drag dropping text from a C# winforms app. I want to Drag the contents from "TextBoxA" and Drop it into a particular location in "TextBoxB". e.g. TextBoxA.Text = "Big " TextBoxB.Text = "Hello World" When dragging "Big" from TextBoxA and dropping it in between "Hello World" from TextBoxB, TextBoxB would end up something like: "Hello Big World"(dependant on where the mouse is released ). 回答1: I hope this example will help you. 回答2: I recognise this is a