Hello guys,
@Jesper, it seems that there was some issue with posting my reply to this forum thread. It was send on May 28, but it never arrived. Thanks to Jacques's post, this thread got back to our attention, thus we found out about this case. I will inform the appropriate department in order to make sure that such cases no longer appear. Please excuse us for the inconvenience caused.
Here is the answer:
If you want to get the selection range in RadRichTextBox you should use the
CaretPosition property of the
Selection property. Due to the wide variety of features supported by
RadRichTextBox, the selection API is different than the API of the standard
RichTextBox control. You can use the following code snippet to determine the start and end position:
More about the selection API can be found in
the online documentation.
To get the selected text use the following code snippets:
If you want to alter the KeyPress event you should create a custom
InputBehavior:
Then you should replace the default input behavior in the following way:
I hope that you guys find this information useful.
All the best,
Svett
the Telerik team