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

Document ruler and RadDocument distance

1 Answer 140 Views
RichTextBox
This is a migrated thread and some comments may be shown as answers.
Thomas
Top achievements
Rank 1
Thomas asked on 14 Nov 2012, 04:06 PM
How can i determined?
For example: When i change layout mode flow to paged the distance changing the document ruler and the raddocument.
I would like copy drag from listbox to document some text.Quote of the mouse position, and set the caret position, when drop completed.
When layout mode flow, allright, but paged mode not good.

1 Answer, 1 is accepted

Sort by
0
Petya
Telerik team
answered on 16 Nov 2012, 04:11 PM
Hello Thomas,

As the DocumentRuler and the RadRichTextBox are normally shown in the same grid row, the RadRichTextBox adjusting its position using the Margin property, you should also do the same when calculating the drop position. Please find attached a demo project with the following setup:

A RadTreeView with some items and a RadRichTextBox are placed on the main page. You can drag and drop items from the tree view in the editor. The editor is set to be in Paged layout mode. In addition, the caret location is shown and the inserted text depends on the style of the current span.

If you are experiencing any issues get back to us with additional details on what to change in the demo.

 
Greetings,
Petya
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Tags
RichTextBox
Asked by
Thomas
Top achievements
Rank 1
Answers by
Petya
Telerik team
Share this question
or