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 add labels to nodes ?

Thread ID:

Created:

Updated:

Platform:

Replies:

69300 Oct 23,2007 09:36 AM Oct 24,2007 02:43 AM ASP.NET Web Forms (Classic) 1
loading
Tags: DiagramWebControl
sattar shaikh
Asked On October 23, 2007 09:36 AM

Hi,
When we create diagram in diagramwebcontrol using web application (Essential Diagram)
at that time can we able to give labels/text to the particular nodes


plz reply me.

Thanks .........

Mohamed Suhaib Fahad A. [Syncfusion]
Replied On October 24, 2007 02:43 AM

Hi Sattar,

Thanks for evaluating Syncfusion products.

Yes. Essential diagram allows the users to add any number of text labels to symbols and links. The labels can be created with Label class and added to a node using label collection editor.

The following code snippet illustrates this.

[C#]

// Create Shape
Syncfusion.Windows.Forms.Diagram.Rectangle rec = new Syncfusion.Windows.Forms.Diagram.Rectangle(373, 300, 120, 55);
rec.FillStyle.Type = FillStyleType.LinearGradient;
rec.FillStyle.ForeColor = Color.White;
rec.FillStyle.Color = Color.BlueViolet;

// Create Label
Syncfusion.Windows.Forms.Diagram.Label reclbl =new Syncfusion.Windows.Forms.Diagram.Label();
reclbl.Text = "Rectangle";
reclbl.FontStyle.Size = 13;
reclbl.FontStyle.Bold = true;

// Add label to Shape
rec.Labels.Add(reclbl);

//Add shape to diagram
this.DiagramWebControl1.Model.AppendChild(rec);

Please refer the samples on diagram web that shipped with Essential studio in the below location that displays diagram with labeled nodes.

[Install drive]:\Documents and Settings\Username \My Documents\Syncfusion\EssentialStudio\5.2.0.25\Web\diagram.web\Samples\2.0

You can also refer the Online ASP.NET samples in the below location.

http://www2.syncfusion.com/syncfusion/infrastructure/samplebrowserasp/samples.aspx?version=2_0

And browse through the Diagram.Web section.

Please follow up with any other details in the Direct trac incident you had already created.

Please let us know if you have any other queries.

Regards,
Fahad


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.

;