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. (Last updated on : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

User-assigned name to node

Thread ID:

Created:

Updated:

Platform:

Replies:

77810 Nov 18,2008 08:08 AM UTC Nov 18,2008 12:19 PM UTC WinForms 3
loading
Tags: Diagram
a
Asked On November 18, 2008 08:08 AM UTC

I've noticed that when user drags and drops nodes onto the diagram, it automatically generates their names in that order:
ControlNode1
ControlNode
ControlNode2
ControlNode3

I want to know whether there is a way for the user to assign a name to it (e.g via a textbox input in a popup dialog) instead of having the default names, and having to change them each time afterwards.

If so, how?

Cheers


Administrator [Syncfusion]
Replied On November 18, 2008 11:29 AM UTC

Nvm. I figured it out. Starting to understand how this stuff works.

[code]
Dim ctrlnode As ControlNode = New ControlNode(btn, New RectangleF(100, 200, 150, 50))
ctrlnode.Name = TextBox1.Text
Me.Diagram1.Model.AppendChild(ctrlnode)
[/code]


Administrator [Syncfusion]
Replied On November 18, 2008 11:49 AM UTC

@Beginner:
----------
Hi Beginner,

The user assigned name can be given to your controls (nodes) as and when they are dropped to the diagram; but programmatically.

I am attaching my sample file herewith, that asks for a name and when the user types the name, it gets assigned to your Nodes.

Update me of your experiences and keep posting your comments.

--X--

@Ameel:
-------
The code snippet is just right!

Keep up the good work and keep coding smart!

--X--

Thanks for your interest in Syncfusion Products.

Happy Coding!

- Ajeet


Administrator [Syncfusion]
Replied On November 18, 2008 12:19 PM UTC

@Beginner:
----------
Hi Beginner,

The user assigned name can be given to your controls (nodes) as and when they are dropped to the diagram; but programmatically.

I am attaching my sample file herewith, that asks for a name and when the user types the name, it gets assigned to your Nodes.

Update me of your experiences and keep posting your comments.

--X--

@Ameel:
-------
The code snippet is just right!

Keep up the good work and keep coding smart!

--X--

My Sample file here at:
----
http://websamples.syncfusion.com/samples/Diagram.Windows/F77810A/main.htm
----

Thanks for your interest in Syncfusion Products.

Happy Coding!

- Ajeet


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.

Warning Icon 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.Close Icon

;