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. Image for the cookie policy date

Label boxes and links

Is there a way to allow the web user to label boxes and links between the boxes?


5 Replies

J. J.Nagarajan Syncfusion Team September 24, 2008 11:40 AM UTC

Hi Kathy ,

Currently the ControlNode class is used to insert only the Windows Forms controls to the diagram. It does not support to add the WebControls into the diagram. Sorry for the inconvenience.

Thanks,
Nagaraj




KG Kathy Gray September 24, 2008 05:00 PM UTC

How about in the code behind? I see that there is a way to label the boxes in the code, but is there a way to label the links in the code?

>Hi Kathy ,

Currently the ControlNode class is used to insert only the Windows Forms controls to the diagram. It does not support to add the WebControls into the diagram. Sorry for the inconvenience.

Thanks,
Nagaraj






J. J.Nagarajan Syncfusion Team September 25, 2008 11:15 AM UTC

Hi Kathy ,

Could you please provide us some more details.

"There is a way to label the boxes in the code" :

Did you try to create a bitmap to label the boxes? If yes then you can add that Bitmap in our BitmapNode and you can connect the BitmapNodes via LineConnector.

Please provide us your way to add the boxes in diagram. It will help us to create a Connector and connect those boxes.

Thanks,
Nagaraj



KG Kathy Gray September 25, 2008 08:53 PM UTC

I have seen the sample for how to add a label to a box. What I want to know: Is there a way to label the line that connects boxes?



J. J.Nagarajan Syncfusion Team September 29, 2008 11:33 AM UTC

Hi Kathy ,

Yes, you can add labels to the connectors like the nodes. Please use the below code snippet to add the labels to the connector.

OrthogonalConnector m_connector = new OrthogonalConnector(rndRect1.PinPoint, rndRect2.PinPoint);
this.DiagramWebControl1.Model.AppendChild(m_connector);
m_connector.LineRoutingEnabled = true;
m_connector.HeadingHead = CompassHeading.South;
m_connector.HeadingTail = CompassHeading.North;
Syncfusion.Windows.Forms.Diagram.Label lbl = new Syncfusion.Windows.Forms.Diagram.Label();
lbl.Text = "Orthogonal Connector";
lbl.FontStyle.Bold = true;
lbl.FontStyle.Italic = true;
lbl.FontStyle.Size = 10;
m_connector.Labels.Add(lbl);
rndRect1.CentralPort.TryConnect(m_connector.HeadEndPoint);
rndRect2.CentralPort.TryConnect(m_connector.TailEndPoint);

Here is the working sample.

http://websamples.syncfusion.com/samples/Diagram.Web/6.3.0.30/F76780/main.htm

Please refer to it and let me know if this helps.

Thanks,
Nagaraj



Loader.
Live Chat Icon For mobile
Up arrow icon