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

Hyperlink Labels in winforms

I'm using the winforms diagram. Is there a way to show the text as a hyperlink? I would like to launch another diagram window when the hyperlink is clicked.

thanks
-Sash


2 Replies

J. J.Nagarajan Syncfusion Team September 30, 2008 05:33 AM UTC

Hi Sash ,

Thanks for your interest in Syncfusion products.

You can use our "TextNode" as a hyperlink label and you can bring a diagram form when you click on it. Please refer to the below code snippet.

TextNode txtnode = new TextNode("Open a new DiagramForm");
txtnode.SizeToText(SizeF.Empty);
txtnode.PinPoint = new PointF(250, 30);
this.diagram1.Model.AppendChild(txtnode);

this.diagram1.EventSink.NodeClick += new NodeMouseEventHandler(EventSink_NodeClick);
void EventSink_NodeClick(NodeMouseEventArgs evtArgs)
{
DiagramForm m_dForm = new DiagramForm();
m_dForm.Show();
}

Here is the working sample.

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

Please refer to it and let me know if this helps.

Thanks,
Nagaraj




SA Sash October 14, 2008 12:35 AM UTC

I saw the textnode sample. What i was looking for is a textnode as a label, something that exists as a property of a parentnode where i dont have to worry about node location,linking and other things.

>Hi Sash ,

Thanks for your interest in Syncfusion products.

You can use our "TextNode" as a hyperlink label and you can bring a diagram form when you click on it. Please refer to the below code snippet.

TextNode txtnode = new TextNode("Open a new DiagramForm");
txtnode.SizeToText(SizeF.Empty);
txtnode.PinPoint = new PointF(250, 30);
this.diagram1.Model.AppendChild(txtnode);

this.diagram1.EventSink.NodeClick += new NodeMouseEventHandler(EventSink_NodeClick);
void EventSink_NodeClick(NodeMouseEventArgs evtArgs)
{
DiagramForm m_dForm = new DiagramForm();
m_dForm.Show();
}

Here is the working sample.

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

Please refer to it and let me know if this helps.

Thanks,
Nagaraj





Loader.
Live Chat Icon For mobile
Up arrow icon