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

How to get text position from paragraph ?

1 Answer 266 Views
RichTextBox
This is a migrated thread and some comments may be shown as answers.
Sopan
Top achievements
Rank 1
Sopan asked on 26 Aug 2013, 05:18 AM
Hi,

I wants to select whole paragraph and texts ( words) inside the paragraph with index position.

If it is possible then how ?

or any alternate way ? 

I want to divide this paragraph into three different paragraph on the basis of word index position

Please help

1 Answer, 1 is accepted

Sort by
0
Iva Toteva
Telerik team
answered on 28 Aug 2013, 12:52 PM
Hello Sopan,

RadRichTextBox and RadDocument do not use integer positions. This is so because the editor allows different types of rich content such as images and annotations, which cannot be counted easily. Some applications would require that they be counted as 1, others would expect them to be left out of the math, etc.

I suggest you look at the DocumentPositions article and the one about DocumentSelection which shows how DocumentPositions can be used.

The property CaretPosition of RadDocument is also an instance of DocumentPosition. You can manipulate it to move the caret at the places of the document where you would like to insert or delete text, as the methods of RadRichTextBox and RadDocumentEditor operate either on selection, or at the current position in the document.

Regards,
Iva Toteva
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 >>
Tags
RichTextBox
Asked by
Sopan
Top achievements
Rank 1
Answers by
Iva Toteva
Telerik team
Share this question
or