How to add a line to a multiline TextBox?

后端 未结 10 624
情话喂你
情话喂你 2020-12-01 15:32

How can i add a line of text to a multi-line TextBox?

e.g. pseudocode;

textBox1.Clear();
textBox1.Lines.Add(\"1000+\");
textBox1.Lines.Add(\"750-999\         


        
10条回答
  •  再見小時候
    2020-12-01 15:58

    You have to use the AppendText method of the textbox directly. If you try to use the Text property, the textbox will not scroll down as new line are appended.

    textBox1.AppendText("Hello" + Environment.NewLine);
    

提交回复
热议问题