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?
TmunaPosted Nov 19, 2009, 2:19 AM
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?
Kirtan PatelPosted Nov 18, 2009, 11:57 AM
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] + " ";
}
}
Nilanka DharmadasaPosted Nov 18, 2009, 12:28 AM
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.
n bPosted Nov 17, 2009, 12:13 PM
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.
Kirtan PatelPosted Nov 17, 2009, 11:38 AM
Can you Provide Sample How you want to Show data in RichTextBox?