How to get text position from paragraph ?

2 posts, 0 answers
  1. Sopan
    Sopan avatar
    34 posts
    Member since:
    May 2012

    Posted 26 Aug 2013 Link to this post


    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
  2. Iva Toteva
    Iva Toteva avatar
    1319 posts

    Posted 28 Aug 2013 Link to this post

    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.

    Iva Toteva
    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 >>
  3. DevCraft R3 2016 release webinar banner
Back to Top