RichTextBox
I have some problems with RichTextBox control: -I want to show string in the RichTextBox like matrix of letters, How can I do it? (How can I define the space between lines and letters?). -When I load text to the RichTextBox I see a blank control and I need to click at it in order to see the text, How can it be solved?

Kirtan PatelRank #292 · 8.6K reputationPosted Nov 17, 2009, 6:38 AM EST
Can you Provide Sample How you want to Show data in RichTextBox?
n b3 reputationPosted Nov 17, 2009, 7:13 AM EST
a b c d e
f g h i j
k l m n o
...
It's not exactly like this because I want to show the string as if it in a table and each letter is in a different cell.
Nilanka DharmadasaRank #1,875 · 794 reputationPosted Nov 17, 2009, 7:28 PM EST
You can do it this way.
Use "\t" inside the text to display a splace between characters.
Use "\n" inside the text to display a new line.
Example :
richTextBox1.Text = "a\tb\tc\td\te\nf\tg\th\ti\tj\nk\tl\tm\tn\to";
If you find this answer useful, please do not forget to mark this as accepted.
Kirtan PatelRank #292 · 8.6K reputationPosted Nov 18, 2009, 6:57 AM EST
private void button1_Click(object sender, EventArgs e)
{
char[] RtbText = richTextBox1.Text.ToCharArray();
richTextBox1.Text = "";
for (int i = 0; i <= RtbText.Length - 1; i++)
{
richTextBox1.Text += RtbText[i] + " ";
}
}
Tmuna7 reputationPosted Nov 18, 2009, 9:19 PM EST
But I need to cancle the space between lines.
Is it possibole in RichTextBox?
When I load text to the RichTextBox I see a blank control and I need to click at it in order to see the text, How can it be solved?