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

How to use HyperlinkRangeStart?

1 Answer 108 Views
RichTextBox
This is a migrated thread and some comments may be shown as answers.
Gerrit Fölster
Top achievements
Rank 1
Gerrit Fölster asked on 23 Jun 2011, 03:57 PM
Hi Telerik Team,

How can I insert a Hyperlink into my document using HyperlinkRangeStart and HyperlinkRangeEnd?
I didn't find any hints in the online documentation.

Thanks,
Gerrit


1 Answer, 1 is accepted

Sort by
0
Accepted
Alex
Telerik team
answered on 28 Jun 2011, 02:29 PM
Hello Gerrit Fölster,

We are working on updating our online documentation, but still we are little behind regarding HyperlingRangeStart/End articles.

Currently, the most straight forward way to use the new hyperlinks is trough the InsertHyperlink methods of the RadRichTextBox class. To do that you will first need to create HyperlinkInfo object where the URI and other important properties of the hyperlink are defined. Here is a short example:

Copy Code
HyperlinkInfo info = new HyperlinkInfo();
info.NavigateUri = "http://www.telerik.com";
radRichTextBox.InsertHyperlink(info, "telerik");
There are several overloads of the InsertHyperlink method, so you can use the one most suited for your needs. All these methods use HyperlinkRangeStart and HyperlinkRangeEnd when inserting the hyperlink so there is no need for you to work directly with these classes.

There are also InsertHyperlink methods in the RadDocument class, but keep in mind that if you use them you won't have the Undo/Redo functionality as they work directly with the document.
 
Sorry for the inconvenience caused insufficient documentation of the new hyperlink API. We are working on bringing our online help up to date as we speak.

Greetings,
Alex
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
RichTextBox
Asked by
Gerrit Fölster
Top achievements
Rank 1
Answers by
Alex
Telerik team
Share this question
or