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

how to set caret position to selection end?

2 Answers 159 Views
RichTextBox
This is a migrated thread and some comments may be shown as answers.
Ajita
Top achievements
Rank 1
Ajita asked on 25 Oct 2013, 06:56 AM
Hi,

I want to set the care position to the selection end.
How to do it.

Regards
Ajita

2 Answers, 1 is accepted

Sort by
0
Petya
Telerik team
answered on 25 Oct 2013, 11:47 AM
Hello Ajita,

Selection can consist of several separate ranges. Here is how you can move the caret to the end position of the first one:
this.radRichTextBox.Document.CaretPosition.MoveToPosition(this.radRichTextBox.Document.Selection.Ranges.First.EndPosition);

I hope this helps!

Regards,
Petya
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WPF.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
0
Ajita
Top achievements
Rank 1
answered on 29 Oct 2013, 05:11 AM
Thanks a lot..
Tags
RichTextBox
Asked by
Ajita
Top achievements
Rank 1
Answers by
Petya
Telerik team
Ajita
Top achievements
Rank 1
Share this question
or