(I normally do this with the Microsoft Browser Control)
8 Answers, 1 is accepted
Thank you for your feedback.
We will implement the hyperlink support in the upcoming service pack. I added your suggestion to our public issue tracking system as a feature request.
Svett
the Telerik team
Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!
Seems that the hyperlink feature is now implemented - most welcome.
However, I picked up the following possible bugs:
1 - RadRichTextBox1.HyperlinkNavigationMode - setting it to click in either design mode or through runtime code does not work - have to use Ctrl Click to navigate the hyperlink
2 - RadRichTextBox1.HyperlinkToolTipFormatString - cannot be set at design time - need to set it via code.
3 - Seems that the following code is not executed when the hyperlink is clicked (ctrl clicked):
Private
Sub
RadRichTextBox1_HyperlinkClicked(sender
As
Object
, e
As
Telerik.WinControls.RichTextBox.Model.HyperlinkClickedEventArgs)
Handles
RadRichTextBox1.HyperlinkClicked
MsgBox(
"YOU CLICKED A HYPERLINK"
)
End
Sub
Input is most welcome on this.
I managed to set the HyperlinkNavigationMode and HyperlinkToolTipFormatString properties of the RadRichTextBox control. The navigation mode property does not change the hyper link behavior. This issue will be addressed for the upcoming service pack. I did not manage to reproduce the HyperlinkClicked event issue. What did I miss? Could you share more details about your scenario and how to reproduce it?
Notice that I am using the latest release Q3 2011 (2011.3 11.1116).
I updated your Telerik points.
Svett
the Telerik team
Q3’11 of RadControls for WinForms is available for download (see what's new). Get it today.
Further to the Hyperlink clicked event issue:
If you click (or ctrl click) a hyperlink what the RadRichTextBox does is open the link in a new external web-browser.
My issue is this: my hyperlink must display a message box something to the following:
ie. When the hyperlink is clicked: msgbox ("You clicked " & hyperlink) - [hyperlink is the link that was clicked]. A web browser must not open up.
I successfully implemented this using a standard web browser control using the following code:
Private
Sub
WebBrowser1_Navigating(sender
As
Object
, e
As
System.Windows.Forms.WebBrowserNavigatingEventArgs)
Handles
WebBrowser1.Navigating
If
e.Url.ToString() <>
"about:blank"
Then
e.Cancel =
True
End
If
Dim
MESSAGETEXT
As
String
=
""
MESSAGETEXT= e.Url.ToString.Remove(0, 6)
MsgBox(
MESSAGETEXT
)
End
Sub
Can anything close to this be achieved with the RadRichTextBox control.
The possibilities are endless if one replaces the MsgBox line with some custom code - this is where coding gets interesting.
Looking forward to your answer.
did u got the solution for hyperlinked event, even m also not getting that event fired.........
please let me know ASAP, it will greatful.
thanks
@Gm:
Presently, the HyperlinkedClicked event is fired only in HyperlinkNavigationMode.CtrlClick mode. This issue is related to the HyperNavigationMode issue that I have mentioned earlier. You can show in MessageBox the clicked URL by using the following code snippet:
Private
Sub
radRichTextBox1_HyperlinkClicked(sender
As
Object
, e
As
HyperlinkClickedEventArgs)
MessageBox.Show(e.URL)
End
Sub
@Sameer: I am glad to inform you that the issue has already been addressed for the upcoming service pack which will be published this week.
Regards,
Svett
the Telerik team
Q3’11 of RadControls for WinForms is available for download (see what's new). Get it today.
Tried with the Ctrl Click -
the event is still not fired.
Tried with Click - even still not fired (as expected)
Svett - It seems you have it working with Ctrl Click for now. Can you please include a small sample project so that I can see where I am going wrong as you seem to have it working with Ctrl Click.
Looking forward to your reply.
I found the way to fire that event after trying many ways
first of all you have to add handler to the hyperlink clicked event
AddHandler
RadRichTextBox1.HyperlinkClicked,
AddressOf
hyperlinkclick
now you write your code in hyperlinkclick procedure
Public
Sub
hyperlinkclick(
ByVal
sender
As
Object
,
ByVal
e
As
Telerik.WinControls.RichTextBox.Model.HyperlinkClickedEventArgs)
Handles
RadRichTextBox1.HyperlinkClicked
Try
e.Handled =
True
''Write your code that you want
Catch
ex
As
Exception
MsgBox(ex.Message)
End
Try
End
Sub
this is working for me, hope you find it helpful