This is a migrated thread and some comments may be shown as answers.

Set target to HyperlinkClicked Event

1 Answer 57 Views
RichTextBox (obsolete as of Q3 2014 SP1)
This is a migrated thread and some comments may be shown as answers.
Vinicius
Top achievements
Rank 1
Vinicius asked on 30 Jan 2012, 08:18 PM
Hi!
Im using RadRichTextBox v1219 and i would like that hyperlinks clicked just be exibited in my application browser, prevents any external action. I can get HyperlinkClicked Event and direct the URL to my browser, but the hyperlink opens an external browser too and i dont want to, there's any way to cancel the event? Thanks!

1 Answer, 1 is accepted

Sort by
0
Stefan
Telerik team
answered on 31 Jan 2012, 12:43 PM
Hello Vinicius,

Thank you for writing.

In order to prevent the hyperlink from opening in a browser, simply set the Handled property from the event arguments of the HyperlinkClicked event to true:
void radRichTextBox1_HyperlinkClicked(object sender, HyperlinkClickedEventArgs e)
{
    e.Handled = true;
}

More information regarding hyperlinks can be found here: http://www.telerik.com/help/winforms/richtextbox-features-document-elements-hyperlink.html.

I hope that the provided information addresses your question. Should you have any other questions, do not hesitate to contact us.

Greetings,
Stefan
the Telerik team

SP1 of Q3’11 of RadControls for WinForms is available for download (see what's new).

Tags
RichTextBox (obsolete as of Q3 2014 SP1)
Asked by
Vinicius
Top achievements
Rank 1
Answers by
Stefan
Telerik team
Share this question
or