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.

Programmatically adding a label to a Symbol

Thread ID:

Created:

Updated:

Platform:

Replies:

43358 Apr 20,2006 06:44 PM May 23,2007 08:36 AM Windows Forms 3
loading
Tags: Diagram
James Sifuentes
Asked On April 20, 2006 06:44 PM

Hello, I am evaluating the product, and I would like to add a symbol, a Ellipse for instance, and show on it a Label. How I could Achieve this? I see on the Diagram Builder Sample, that when you add a Ellipse, you are able to set on it a Collection of Labels, but this Collection is not available from code. Sample code: Syncfusion.Windows.Forms.Diagram.Ellipse item = new Syncfusion.Windows.Forms.Diagram.Ellipse(); Syncfusion.Windows.Forms.Diagram.Label label1 = new Syncfusion.Windows.Forms.Diagram.Label(); item.Bounds = new System.Drawing.RectangleF(50, 50, 100, 100); /* This would be an easy way... item.Labels.Add(new Syncfusion.Windows.Forms.Label("My Ellipse Title"); */ this.diagram1.Model.AppendChild(item); Thanks, James

Administrator [Syncfusion]
Replied On April 21, 2006 04:50 AM

Hello James, Thanks for the code snippet. We have a SymbolLabel class which intend to add label to the SymbolNode using AddLabel()method.kindly, refer the Evaluation center articles which would help you to programmatically add a label to the SymbolNode. Also, we have various samples featured with adding labels to the SymbolNodes programmatically. A list of them are, 1. SymbolFactory and IshikawaDiagram Diagram Samples which demonstrates about labeling the SymbolNode using the SymbolLabel class. 2. SimpleFlow and DynamicSymbol sample explains about labeling the SymbolNode using the Label class. Please let us know if you have any further queries , we will be glad to assist you. Regards, Praveena.

Prachi
Replied On May 17, 2007 08:51 AM

how to add label to Bitmapnode programmatically

Meera Fathima [Syncfusion]
Replied On May 23, 2007 08:36 AM


Hello Prachi,

I am sorry about this delay in responding.

Regarding your query, if your intension is to add label to a bitmapnode, you can do this by customizing the BitmapNode class and adding labels property into it. Also you need to override RenderContiguousData() method within the custom bitmapnode class which is used to render labels on bitmap nodes.

Please refer the forum post - http://www.syncfusion.com/support/Forums/message.aspx?&MessageID=61245 to get more details about how to go about with this and let me know if you have any more queries regarding this.

Thanks for your interest in Syncfusion products.

Best Regards,
Meera

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.

;