0

I am a .net developer . I am building a desktop application. how to add LinkLabel after some text in richtexbox ?

i have used .past method for insert text.

  • You cant add a LinkLabel in the RichTextBox. That is why there is a property you can use: `DetectUrls`. Please see my answer on this. I think you meant how can i see a Url link in RichTextBox... – Trevor Jul 20 '15 at 14:08

1 Answers1

0

By default it should detect links in the control itself. If not you may have changed that sometime.

Go to properties of the control and look for DetectUrls make sure that is set to True. This should detect links in the control.

To handle the links when clicking them you can create an event handler for the LinkClicked event to handle all links clicked in the control. The LinkClickedEventArgs that is provided to the event handler for the LinkClicked event provides data that enables you to determine which link was clicked in the control in order to process the link.

You can read more here: https://msdn.microsoft.com/en-us/library/system.windows.forms.richtextbox.detecturls(v=vs.110).aspx

Trevor
  • 7,777
  • 6
  • 31
  • 50