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

textformat after text import

1 Answer 67 Views
RichTextBox
This is a migrated thread and some comments may be shown as answers.
robert
Top achievements
Rank 1
robert asked on 14 Oct 2011, 09:34 PM
Hello, i try to insert some plain text from mails into a raddocument.
After insert i have several spaces between the words, i.e. Hello   this   is   a   test.
How can i avoid this issue? I also try the import with the txtprovider but same behaviour. 
ParagraphSpacing seems after correction (see in code) correct.
DItem.Insert(TextBody, Nothing)
DItem.Selection.SelectAll()
DItem.ParagraphDefaultSpacingAfter = 0
DItem.ParagraphDefaultSpacingBefore = 0
DItem.LineSpacing = 1

Best regards robert
Dim DItem As New RadDocument
DItem.Insert(TextBody, Nothing)


1 Answer, 1 is accepted

Sort by
0
Alex
Telerik team
answered on 19 Oct 2011, 01:08 PM
Hello Robert,

This looks like a strange issue. Unfortunately we were unable to reproduce it. Here is how we tried:

Dim doc As New RadDocument()
doc.Insert("Hello this is a test.", Nothing)
Me.radRichTextBox.Document = doc
Are you sure the text you are importing does not contain any special symbols or additional spaces? Other thing you can check is whether the paragraphs in you document are not justified (ParagraphAlignemnt property is set to RadTextAlignment.Justify) , which would add some space between the words so that the text is aligned to both the left and right margins.

If non of these is the problem, we would appreciate if you could send us a sample project so we could investigate.

As for the ParagraphSpacing and LineSpacing properties - these properties control the vertical spacing between paragraphs or lines, so they don't affect the spacing between the words.

I hope this was helpful. Don't hesitate to contact us again if you need further help.

Kind regards,
Alex
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Tags
RichTextBox
Asked by
robert
Top achievements
Rank 1
Answers by
Alex
Telerik team
Share this question
or