Hello Zoran Zigic,
Thanks for your question!
Yes - it is possible to have RadRichTextBox as readonly and still to have the ability to handle the click events of the inserted custom inline UI controls.
The property which RadRichTextBox exposes for this purpose is named IsReadOnly.
It should be set to true. What this property does is actually to prevent user from typing in the box, but it still allows selection, copy/paste, click, etc.
To insert UIElement in the RadRichTextBox you can use the InlineUIContainer
class. It has UiElement
property and Width/Height
properties that should be set explicitly.
Here is a sample code for building a document using our API.
RadDocument doc =
Section section =
Paragraph paragraph =
Span span =
"Some Text before..."
Button button =
button.Width = 100;
button.Height = 50;
(s, a) =>
"Your button was just clicked!"
InlineUIContainer container =
container.UiElement = button;
container.Width = button.Width;
container.Height = button.Height;
Span span2 =
"Some Text after..."
editor.Document = doc;
Please, let me know if this helps or are there any further questions.
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