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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Controller.MouseLocation

Thread ID:

Created:

Updated:

Platform:

Replies:

44967 Jun 7,2006 11:55 PM UTC Aug 10,2006 01:58 PM UTC WinForms 6
loading
Tags: Diagram
Truman Lackey
Asked On June 7, 2006 11:55 PM UTC

I have custom data that I am dragging onto a diagram and I am trying to get the location of the mouse using diagram.Controller.MouseLocation. This seems to be putting invalid data in the x and y locations for my application. Can somebody verify this behavior in a dragdrop event for the diagram with the latest version?

Truman Lackey
Replied On June 8, 2006 04:30 PM UTC

Resolved with: Dim pt As Point = Me.mainDiagram.PointToClient(New Point(e.X, e.Y)) in the dragdrop event. If Controller.MouseLocation is not valid anymore for a dragdrop then article: http://www.syncfusion.com/Support/article.aspx?id=10566 may need updated.

Administrator [Syncfusion]
Replied On July 4, 2006 09:44 AM UTC

Hi, Yes, you need to use PointToClient() to compute the location of specified screen point into client co-ordinates the within the Diagram.DragDrop() event method. I have updated the KB article with these details. Thanks for pointing out this one. You can verify the updated KB article using the following link - http://www.syncfusion.com/support/kb/diagram/Default.aspx?ToDo=view&questId=38 Thanks, Meera.

Truman Lackey
Replied On July 28, 2006 01:37 AM UTC

Dragdrop on zoomed diagram drops object in wrong position.

Modified DragDrop with zoom tool activation attached.

Any work around for this with 4.1.0.62 would be great.

Truman

vb5.zip

Administrator [Syncfusion]
Replied On August 8, 2006 10:18 AM UTC

Hi Truman,

We regret for this delay in getting back to you.

Thank you for the sample post.We have logged a QA report on this issue .The report id is # 2516 and you can track the progress of this fix by referring the WebBasedTracking system.

Please stay assured that we will do our best to fix the issues at the earliest.

Thank you for your patience.

Regards,
Praveena.

Truman Lackey
Replied On August 9, 2006 06:14 PM UTC

The following code in 4.1.0.62 seems to be working for the dragdrop example. I have not tested it extensively.

Private Sub diagram1_DragDrop(ByVal sender As Object, ByVal e As System.Windows.Forms.DragEventArgs) Handles diagram1.DragDrop
Dim pt As Point = Me.diagram1.PointToClient(New Point(e.X, e.Y))
Dim vPoint As New PointF(pt.X, pt.Y)
Dim wPoint As PointF = Me.diagram1.View.ViewToWorld(vPoint)

''if this is a bitmap then insert a BitmapNode in Diagram
If e.Data.GetDataPresent(DataFormats.Bitmap) Then
Dim bmpnode As New BitmapNode(CType(e.Data.GetData(DataFormats.Bitmap), Bitmap))
Dim insCmd As New InsertNodesCmd
insCmd.Nodes.Add(bmpnode)
insCmd.Location = wPoint
diagram1.Controller.ExecuteCommand(insCmd)
ElseIf e.Data.GetDataPresent(GetType(TreeNode)) Then
Dim treenode As TreeNode = CType(e.Data.GetData(GetType(TreeNode)), TreeNode)
Dim textnode As New TextNode
textnode.Text = treenode.Text
textnode.SizeToText(New SizeF(0, 0))
textnode.Location = wPoint
Me.diagram1.Model.AppendChild(textnode)
Me.diagram1.Refresh()
End If
End Sub ''diagram1_DragDrop)


Administrator [Syncfusion]
Replied On August 10, 2006 01:58 PM UTC

Hi Truman,

We are glad to here that you got the issue resolved. I tested with the Diagram DragDrop sample and the application is working as expected. However we will keep you updated regarding the progress of the defect report.

Thank you for your efforts.

Regards,
Praveena.

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.

Please sign in to access our forum

or the page will be automatically redirected to sign-in page in 10 seconds.

Warning Icon 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.Close Icon

;