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
close icon

Add Lable to Nodes

Good afternoon

I’m using syncfusion Windows Forum. I created sample palette. And successfully I can drop symbols in the diagram. However, I want to add labels to those symbols (add the symbols by VB code).

Also those symbols have Property pages. And I want to display some of those properties in the diagram.

 

Regards

Malik.


1 Reply

AK Ashok Kumar V Syncfusion Team August 20, 2014 08:14 AM UTC

Hi Malik,

Thanks for using Syncfusion product.

We suggest you to use diagram’s “Label” to add the label for the respected “Nodes” also we suggest you to use diagram’s “PropertyEditor” to set view the property of the selected Nodes. Please refer the below code snippet and sample for your reference.

Here is the code snippet:

[VB]

'Displaying diagram property to the diagram

propertyEditor1.Diagram = Me.diagram1

'Adding Symbol to the Symbol palattee

Dim sym As New SymbolPalette()

sym.Name = "Symbols"

Dim ellip As New Ellipse(100, 100, 100, 70)

 

'Adding Label to the Node

Dim lbl As New Syncfusion.Windows.Forms.Diagram.Label()

lbl.Text = "Ellipse-1"

ellip.Labels.Add(lbl)

sym.AppendChild(ellip)

Please try the attached sample and let us know if any queries.

Regards,
Ashok Kumar.


Attachment: VB_5651ef50.zip

Loader.
Live Chat Icon For mobile
Up arrow icon