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

Section pointed to by the cursor

1 Answer 48 Views
RichTextBox
This is a migrated thread and some comments may be shown as answers.
Yasin
Top achievements
Rank 1
Yasin asked on 06 Oct 2016, 05:23 PM
How can i get access to the section which is currently hovered by the cursor in a "RadRichTextBox" ?

1 Answer, 1 is accepted

Sort by
0
Tanya
Telerik team
answered on 11 Oct 2016, 08:15 AM
Hi Yasin,

You can use the methods of the DocumentPosition. Here is a sample code that shows how you can obtain the section that the caret is currently positioned on:
Section currentSection = this.radRichTextBox.Document.CaretPosition.GetCurrentSectionBox().AssociatedSection;

Hope this helps.

Regards,
Tanya
Telerik by Progress
Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.
Tags
RichTextBox
Asked by
Yasin
Top achievements
Rank 1
Answers by
Tanya
Telerik team
Share this question
or