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.

Custom link logic

Thread ID:

Created:

Updated:

Platform:

Replies:

61446 May 25,2007 10:30 AM May 29,2007 02:07 AM Windows Forms 4
loading
Tags: Diagram
Dan Dorey
Asked On May 25, 2007 10:30 AM

Using v5.

As you can see from the screen shot of our custom symbols, the orthoganal links draw themselves right through parts of the symbols.

I need to have a link that will automatically draw so that it goes directly outside the symbol and then move appropriately to connect up.

Can you give me an idea of what my best approach would be to accomplish this?

Thanks,
Dan

Linking Issue.zip

Ramya R [Syncfusion]
Replied On May 28, 2007 07:54 AM


Hi Eric,

Thank you for your interest in Syncfusion Products.

A link is connector between two ports of a symbol. So the links by default get drawn sometimes over the symbol depending upon the position of the ports.

If your intention is to avoid the links getting dappearing over the symbol then is can be done by positioning the ports along the edges of a node as shown in the code snippet below,

rect1.CentralPort.Position = Position.TopCenter;

Let me know if I am wrong in getting your requirement.

Thanks & Regards,
Ramya.

Ramya R [Syncfusion]
Replied On May 28, 2007 10:23 AM

Hi Dan,

Sorry for addressing you with a different name.

A link is connector between two ports of a symbol. So the links by default get drawn sometimes over the symbol depending upon the position of the ports.

If your intention is to avoid the links from getting appeared over a symbol then is can be done by positioning the ports along the edges of a node as shown in the code snippet below,

rect1.CentralPort.Position = Position.TopCenter;

Let me know if I am wrong in getting your requirement.

Thanks & Regards,
Ramya.

Dan Dorey
Replied On May 28, 2007 11:09 AM

Ramya,

I think you have the requirement correct. However, I don't think moving the port to the extreme right is going to be good enough in this case. At best this would mean the lines are directly along the edges of the symbol. If the target symbol the link is connecting to is behind (i.e. the left side in my screen shot) then the link is going to run down the entire height of the symbol. I'd need the link to move out maybe 20 pixels to the right of the symbol before moving toward the target symbol. Let me know if I need to clarify that better.

Thanks,
Dan

>Hi Dan,

Sorry for addressing you with a different name.

A link is connector between two ports of a symbol. So the links by default get drawn sometimes over the symbol depending upon the position of the ports.

If your intention is to avoid the links from getting appeared over a symbol then is can be done by positioning the ports along the edges of a node as shown in the code snippet below,

rect1.CentralPort.Position = Position.TopCenter;

Let me know if I am wrong in getting your requirement.

Thanks & Regards,
Ramya.

Ramya R [Syncfusion]
Replied On May 29, 2007 02:07 AM

Hi Dan,

Thank you for the update.

In general the connectors drawn between the nodes depend on the position of the nodes.

The line segment of a connector cannot be moved or adjusted programmatically after establishing connections between the nodes since the connectors get drawn depending on the position of the nodes.

Though at the runtime the line segment of OrthogonalConnector can be adjusted by moving the control point of the connector but sometimes the line segment of the connectors continue to appear within the symbol depending on the position of the nodes.

So you can avoid the links from appearing within symbol by adjusting the X and Y position of the nodes.

Or by sending the links to the back of the nodes using the code snippet below,

this.diagram1.Model.SendToBack(link);

By sending the links to back, the part of the link which is not over the node only appears when the ouput is viewed.

Please let me know whether this helps you.

Thanks & Regards,
Ramya.

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.

;