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.
Unfortunately, activation email could not send to your email. Please try again.

Diagram drag over rectangle.

Thread ID:

Created:

Updated:

Platform:

Replies:

22575 Dec 15,2004 02:15 PM Dec 21,2004 12:16 PM Windows Forms 2
loading
Tags: Diagram
Truman Lackey
Asked On December 15, 2004 02:15 PM

I am trying to change and show the rectangle that is shown when a drag and drop is performed on a diagram. I have some custom data that I am dropping to the diagram and I want to show the bounds of the data in the rectangle. Is there a way to do this? Thanks, Truman Lackey

Administrator [Syncfusion]
Replied On December 16, 2004 05:12 PM

Hi Truman, To allow dragging and dropping an object other than a NodeCollection or a DragDropData object you will have to override the drop and drop methods in Diagram. Those methods are OnDragEnter, OnDragDrop, OnDragLeave, and OnDragOver. The reason is that the drag and drop code only looks for objects of type NodeCollection or DragDropData. Anything else such as a Bitmap or Metafile will be ignored. I discussed this issue with the Diagram team and they said a couple of changes\enhancements needed to made to make it easier to implment what you are seeking: - Adding stock code that will recognize images such as bitmaps and metafiles and allow them to be tracked and dropped onto the diagram. - And modularize the drag and drop methods in Diagram in such a way that it allows the user to add new types without having to override and re-implement those methods. Regards Arun

Administrator [Syncfusion]
Replied On December 21, 2004 12:16 PM

Hi Truman, Looks like your question was about changing the outline rectangle that Essential Diagram renders during a drag-drop operation. The drag rectangle that you notice over the Diagram control is rendered through the Diagram.StartDragRect(int x, int y, int width, int height), Diagram.UpdateDragRect(int x, int y) and Diagram.EraseDragRect() methods present in the Syncfusion.Windows.Forms.Diagram.Controls.Diagram class that implements the Diagram control type. Unfortunately, these methods are all marked as private and in order to override the drawing you will have to first override the Diagram.OnDragEnter(System.Windows.Forms.DragEventArgs e), Diagram.OnDragOver(System.Windows.Forms.DragEventArgs e) and Diagram.OnDragLeave(System.EventArgs e) methods from which the above XXXDragRect(...) methods are invoked, copy/paste the base implementation and use your custom drawing methods in place of the Start/Update/EraseDragRect(...) drawing routines. If you do not have the source code version of Essential Diagram and would like to take a look at the base implementation for help with your custom code, please send an email to ''prakashs@syncfusion.com'' with a reference to this forum post. Regards, Prakash Syncfusion, Inc.

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;