2 Replies Latest reply on Jul 8, 2017 3:27 PM by Roman Mettler

    drag and drop from taskpane

    Roman Mettler

      Good aftenoon!

      im building a c# plugin, and need to implement drag&drop operations, the scenario is like:

      my taskpane have a treeview with parts, and i need to drop them in assembly,

      iv set a breakpoint in "Doc_FileDropPreNotify" but never get fired...

      any help would be appreciated.

        • Re: drag and drop from taskpane
          Amen Allah Jlili

          We are NOT wizards. We need code Mr. Roman

            • Re: drag and drop from taskpane
              Roman Mettler

              Hello Mr. Jlili, i didnt thought that was important the code, but was nice that you remember me that, now the question is:

              what parts of the code should i post here?

               

              in AssemblyEventHandler class:

               

              override public bool AttachEventHandlers()

              {

                   doc.FileDropPreNotify += Doc_FileDropPreNotify;

                   return true;

              }

               

              private int Doc_FileDropPreNotify(string FileName)

              {

                    System.Windows.Forms.MessageBox.Show("DropDetected");  -> never run with dragged files from my treeview;

                    return 0;

              }

               

              in taskpane class:

               

              fdtv_projectTree.AllowDrop = true;

               

               

              private void fdtv_projectTree_ItemDrag(object sender, ItemDragEventArgs e)

              {

                    var node = (FControls.FDirectoryTreeNode)e.Item;

                     ((FControls.FDirectoryTreeView)sender).DoDragDrop(node.Path, DragDropEffects.Copy);

              }

               

               

              private void fdtv_projectTree_DragEnter(object sender, DragEventArgs e)

              {

                   e.Effect = DragDropEffects.Copy;

              }

               

               

              Hope this can clarify what im trying to do, drag operations from the native explorer treeview taskpane are workinf and the event Doc_FileDropPreNotify is reached...

              can be something related with permissions?

               

              thank you in advance,

              Bruno Frade.