Set target to HyperlinkClicked Event

2 posts, 0 answers
  1. Vinicius
    Vinicius avatar
    9 posts
    Member since:
    Dec 2011

    Posted 30 Jan 2012 Link to this post

    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!
  2. Stefan
    Admin
    Stefan avatar
    2890 posts

    Posted 31 Jan 2012 Link to this post

    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).

  3. UI for WinForms is Visual Studio 2017 Ready
Back to Top