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

Spacing between lines

1 Answer 228 Views
RichTextBox
This is a migrated thread and some comments may be shown as answers.
Kamal
Top achievements
Rank 1
Kamal asked on 11 Jul 2011, 09:35 AM
Ho do i change the spacing between the lines that get created when i press enter inside the Richtectbox the lines are loose and speratesd and the specifying Line spacing as 1 doesnt work.
Also if i copy few lines from notepad and paste it in rich text box even then i have this issue
Please suggest how can i control this spacing

1 Answer, 1 is accepted

Sort by
0
Vesko
Telerik team
answered on 13 Jul 2011, 10:02 AM
Hi Kamal,

You can use the ChangeParagraphLineSpacing method of RadRichTextBox. It internally changes the LineSpacing property of Paragraph. It will set a spacing between all lines in the paragraph.

If you just want to have more space between your paragraphs, you can use ChangeParagraphSpacingBefore/ChangeParagraphSpacingAfter methods of RadRichTextBox which internally set the SpacingBefore/SpacingAfter properties of the Paragraph.

This is needed due to the fact that pressing enter inserts a new paragraph (as in Word). If you would like a line break instead, you can use Shift+Enter.

Kind regards,
Vesko
the Telerik team

Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!

Tags
RichTextBox
Asked by
Kamal
Top achievements
Rank 1
Answers by
Vesko
Telerik team
Share this question
or