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

Span Tab values

1 Answer 21 Views
RichTextBox
This is a migrated thread and some comments may be shown as answers.
Robert
Top achievements
Rank 1
Robert asked on 22 May 2012, 08:27 PM
Hi,

When tabbing in a document I noticed that the span XAML output is like so:

<t:Span Text="&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;" />

How do you programmatically achieve the same result?

Do I just do:

radRichTextBox.Document.Insert("&#x9;")  ?

If you can do the above, is it possible to change the value of 9 to say 20 to make the span distance larger? i.e.

radRichTextBox.Document.Insert("&#x20;")

Does the &#x9; code represent 9 blank spaces, " " (same as the space bar) ? or does it have a special size associated to it?

Thank you for your time,

Rob

1 Answer, 1 is accepted

Sort by
0
Accepted
Vasil
Telerik team
answered on 25 May 2012, 04:02 PM
Hello Robert,

You are right, "&#x9" code represents a tab in xaml, but '9' it does not mean 9 blank spaces. If you want to insert tabs in code behind, you can do it as follows:

this.radRichTextBox.Insert("\t\t\t");
or just insert a span which contains them.

I hope this helps. Greetings,
Vasil
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
Vasil
Telerik team
Share this question
or