views:

263

answers:

1

I have a RichTextBox control on a form with some text, some of which are URLs. The DetectUrls property is set to true. The control properly detects my URLs (they're blue, underlined and the cursor changes to a hand when I hover them). However, when I click on them nothing happens (double-click and ctrl+click are similarly ineffective). I've set the ReadOnly property to true, not sure if that matters. Am I missing something obvious?

+1  A: 

there is an event you hook up to that is fired when links are clicked on.

Hook up to that

public event LinkClickedEventHandler LinkClicked;

OnLinkClicked
dmportella
Ahh, not sure how I missed that, it is pretty obvious. Do you know how to open the default browser with the URL that was clicked in that event?
Jason
Try Process.Start(e.LinkText).
itsmatt