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.

Port Labelling

Thread ID:

Created:

Updated:

Platform:

Replies:

51887 Nov 15,2006 08:06 PM Nov 21,2006 07:39 PM Windows Forms 4
loading
Tags: Diagram
Rob
Asked On November 15, 2006 08:06 PM

Hi,

Is there a way to add a label to a port?

For instance, I currently have symbols with multiple in/out ports (in on the left, out on the right) but these ports all have different meanings. I'd like to use labels (or something similar) to express this to the user.

Any help would be appreciated!

Regards
Rob

J.Nagarajan [Syncfusion]
Replied On November 16, 2006 09:08 PM

Hi Rob ,

Thanks for your interest in Essential Diagram. Currenty the diagram does not support the Port labels to point out the different ports. However you can use the TextNodes to express these ports to the user. Please refer to the attached screen shot that shows this completely. I hope this will meet your requirement.

Please let me know if you have any questions.

Regards,
Nagaraj

Port Label.zip

Rob
Replied On November 17, 2006 09:38 AM

The issue I have is that there may be any number of ports on either side of the symbol... I'd need to have a way that can dynamically show the user the names of each port.

I'll look into textnodes but at a first glance they may not be suitable (especially when the user makes connections between some of the ports).

Rob
Replied On November 17, 2006 09:38 AM

Almost forgot.. Thanks for your help!

J.Nagarajan [Syncfusion]
Replied On November 21, 2006 07:39 PM

Hi Rob,

Sorry for the delay in getting back to you. You can use the symbol labels and position them at the desired location. You can use label.OffsetX / label.OffsetY properties to position the label at the desired location. This method moves the label by the given X and Y offsets from the control point. Please refer to the following code snippet.

SymbolLabel lbl2 = new SymbolLabel();
lbl2.Text = "Port1";
lbl2.Anchor = BoxPosition.TopRight;
lbl2.OffsetY=25;
this.AppendChild(lbl2);

I have attached the sample that demonstrates this completely. Please kindly refer to it and let me know if you have any questions.

Regards,
Nagaraj

Portlabelling.zip



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.

;