multi lines on a text box[resolved]
I must be retarded. I need to write progress to a text box. One line after the other. I have the multiline property to true, but I cannot get newline escape char to do anything.
Code:
private....()
{
addText("parsing signals");
addText("finished parsing signals");
//etc...
}
private void addText(String iText)
{
txtProgress.Text=txtProgress.Text+iText+"...\n";
}
Code:
It outputs to the textbox:
reading file...finished reading file...parsing signals...finished parsing signals...
Code:
Instead of:
reading file...
finished reading file...
parsing signals...
finished parsing signals...
However, when I copied and pasted the output into this page, it had the \n chars put in.
Is there some other property on the text box that I need to set?
Re: multi lines on a text box[resolved]
Instead of "\n", you have to use System.Environment.NewLine.
You can just do a replace() on the new text before you add it to the text box.
Is there something that I am still missing?