Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic How to translate x,y diagram coordinates to window (Read 1447 times)
solisgsandc
YaBB Newbies
*
Offline



Posts: 40
Joined: Dec 18th, 2009
How to translate x,y diagram coordinates to window
May 12th, 2010 at 2:31pm
Print Post  
I would like to know how one could translate the current x,y diagram coordinates into screen x,y diagram coordinates. I am using a component popup menu and have it called from a mouse right click of a node. When I select one of the menu items, a windows dialog is suppose to popup beside the node. I used the x,y of the node's bounds BottomRight point. It works well if I do not scroll. Once I scroll, the dialog is off to one side of the screen. Is the answer to my question lies with the ScrollX and ScrollY properties of the diagram?
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: How to translate x,y diagram coordinates to wi
Reply #1 - May 12th, 2010 at 2:38pm
Print Post  
For context menus you could set ContextMenu.Placement = PlacementMode.Mouse to show the menu at the mouse position. For other purposes call diagram.DocumentPlane.TransformToVisual() to get a Transform object that will convert points from the diagram coordinate system to the one of the specified Visual.

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint