We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Drag from TreeviewAdv onto Diagram

Hi Arun, I am populating a Syncfusion.TreeviewAdv with some TreeNodeAdv nodes. I intend to drag these nodes onto my diagram which contains some symbols that I have already dragged from my symbol palette. Unfortunately when I start my drag drag from the treeview over the diagram I get "symbol" outlines appearing (i.e. the MouseTracker), even though I am not dragging a NodeCollection onto the diagram or even a SymbolModel. It appears to be resurrecting the last dragged symbol shape in the MouseTracker. I have inspected the code in Diagram.cs and it seems to be calling the UpdateDragRect method and taking no account of what is being dragged? protected override void OnDragOver(System.Windows.Forms.DragEventArgs e) { POINT ptClient = new POINT(e.X, e.Y); Window.ScreenToClient(this.Handle, ref ptClient); UpdateDragRect(ptClient.X, ptClient.Y); base.OnDragOver(e); } Is this a bug? My drag from the Treeview looks like this: private void treeStructure_ItemDrag(object sender, System.Windows.Forms.ItemDragEventArgs e) { TreeNodeAdv[] treeNodes = e.Item as TreeNodeAdv[]; if (treeNodes != null) { if (treeNodes.Length > 0) { MyObject myObj = treeNodes[0].Tag as MyObject; if (myObj != null) { DragDropEffects result = treeProjectStructure.DoDragDrop(myObj, DragDropEffects.Copy); } } } } My DragDrop event in the diagram works fine, it is just that the MouseTracker should not appear. I am using v3.0.0.19 and .NET Framework 1.1 Thanks Jimski

3 Replies

AD Administrator Syncfusion Team December 14, 2004 05:10 PM UTC

Hi Jimski Have you taken a look at the DragDrop sample that ships with Essential Diagram? Can you post steps to reproduce this problem in that sample. Regards Arun


JB James Brock December 15, 2004 06:28 AM UTC

Hi Arun, I have reproduced a similar issue in the DiagramBuilder example. It is very simple to reproduce and the same behaviour occurs in my example when dragging from my treeview. i) Run DiagramBuilder ii) Load my symbol palette (have sent this to the support email for your attention) iii) Drag a symbol from the palette onto the diagram. iv) Open windows explorer v) Drag any file onto the diagram (mine was a txt file). vi) You will notice that the square outline of the last dragged symbol appears when you drag the file over the diagram. You may also get an additional static outline appear fairly randomly on the diagram too. I understand that in the DiagramBuilder example it has not in anyway tried to handle the drag from a file, however, when running my example I have and the same thing occurs. As I mentioned in my post, I think the DragOver event in the diagram does not take into account what is being dragged and will "resurrect" the previously dragged rectangle. Thanks Jimski


AD Administrator Syncfusion Team December 15, 2004 04:31 PM UTC

Hi Jimski The Diagram team has fixed this issue and the fix should be part of the release version of Essential Suite 3.0. We are testing the 3.0 version which should go out before the end of this week. Regards Arun

Loader.
Live Chat Icon For mobile
Up arrow icon