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.

how to place node at specified coordinates

Thread ID:

Created:

Updated:

Platform:

Replies:

78111 Nov 28,2008 09:40 AM Dec 1,2008 09:29 AM Windows Forms 4
loading
Tags: Diagram
MagicXtr
Asked On November 28, 2008 09:40 AM

Hi,

Is there any way to set the location of node by specifying its coordinates (in descktop version of the diagram)? If there is no such posibility I would like to suggest to add it

Thanks a lot,
Bork


Administrator [Syncfusion]
Replied On November 28, 2008 10:52 AM

Hi Bork,

To place the nodes at some co ordinate point, use the following code snippet:

**********
Rectangle node, for example:
Rectangle rect = new Rectangle(0,0,100,150);

Set Coordinate location:
rect.PinPoint = new PointF(200,200);

**********

I am confident that this will resolve your query.

Happy Coding!

- Ajeet



Ron Alan Sawyer
Replied On November 28, 2008 08:04 PM

Note that the PinPointOffset is important as well. If it is set to 0,0 then

rect.PinPoint = new PointF(200,200);

Will set the upper left hand corner of your rect to 200,200.


MagicXtr
Replied On December 1, 2008 03:16 AM

Thanks a lot. I've found another method also: node.Translate(x, y);


Administrator [Syncfusion]
Replied On December 1, 2008 09:29 AM

Hi RAS,

The PinPointOffset is used to specify the "Centre of mass" for the selected Node, i.e. it defines the point keeping which constant, the rotate handle works.

Happy coding!

- Ajeet


>Note that the PinPointOffset is important as well. If it is set to 0,0 then

rect.PinPoint = new PointF(200,200);

Will set the upper left hand corner of your rect to 200,200.




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.

;