Reputation: 149
I just started using Richtextboxes for copying my whole text file to my RTB in a window,
My question is, how to format it in a way that uses 1 character per cell format similar to notepad? The only line of code i use to place the text in RTB is :
richTextBox1.Text = File.ReadAllText(@fileLocation);
I tested by editing font in properties but it does not help
My program in RTB currently looks like it is from a microsoft word formating where the space consumed by the letter 'i' is different from the letter 'O'
Thanks and cheers to all who can help
Upvotes: 2
Views: 588
Reputation: 941397
You are looking for a fixed pitch font. One that uses the same amount of space for every glyph.
There are not many to choose from, most machines have only a few installed. Change the Font property and pick Courier New, Consolas or Lucida Sans.
Upvotes: 6