Hello, I've got a problem with showing a textfile in a correct manner. Blank characters makes my "columns" that I have made with blank characters/tabs. Let me show what I meen...
my textfile:
| | text mjukdjur datum 9999-66-33 9999-66-33
|
Now everything is fine, but when I try to put the text inte a control my "columns" is "corrupt". I've tried a listbox and textbox. In a control it looks like this:
| | text mjukdjur datum 9999-66-33 9999-66-33
|
In my example (controlexample). The number och blank characters from the left to 9999 is the same as in the real textfile (I just took some away to demostrate..
Finally the code for binding the control:
| | StreamReader reader = new StreamReader("163400.0002", Encoding.Default); while (!reader.EndOfStream) { string str = reader.ReadLine(); Console.Out.WriteLine(str); richTextBox1.Text += str + '\n'; listBox1.Items.Add(str); } reader.Close(); |
Can someone please tell me what to do, I realy need to show the user the propper "columns".
Best regards