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.

Changing the polyline default name

Thread ID:

Created:

Updated:

Platform:

Replies:

67602 Aug 24,2007 09:35 AM Aug 24,2007 03:55 PM Windows Forms 1
loading
Tags: Diagram
Elia Chkayra
Asked On August 24, 2007 09:35 AM

hello,
I have an application in wich i must give each node drawed in the diagram a default name.
When using the polyline tool, and when drawing is finnished, it gives to the node the default name PolylineNode, and then polylineNode1 and so on..
I want to be able to change this fact and give the drawed node a default name : Room1, then Room2 and so on?
how can this be done, and wich methods i have to use.. thanks a lot .
Elia

Ajish [Syncfusion]
Replied On August 24, 2007 03:55 PM

Hi Elia,

Thank you for your interest in syncfusion products.

You can change the polyline default name is can be done by overiding the PolyLineBase Class CreateNode(). Here is the code for doing it,

>>>>
static int i = 0;
protected override Node CreateNode( PointF[] pts )
{
LineBase toReturn = new PolylineNode( pts );
SetDecorator( toReturn );
i++;
toReturn.Name = "Room" + i.ToString();

return toReturn;
}
>>>>

Here is the sample link for your refference,

Sample: http://websamples.syncfusion.com/samples/Diagram.Windows/F67602/main.htm

Kindly take a look and let me know if you need further assistance.

Regards,
Ajish.

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.

;