'C#'에 해당되는 글 9건

  1. 2014.03.19 c# textbox 자동 스크롤
2014. 3. 19. 09:59

At least in .NET 2.0, the TextBox control doesn’t have a property to let the TextBox automatically scroll to the bottom when it is set to multiline.

You have to write code like this:

textBox1.Text += “Test string \n”;
textBox1.Update();
textBox1.SelectionStart = textBox1.Text.Length;
textBox1.ScrollToCaret();

OR, you can use the following code:

textBox1.AppendText(”This is a test string \n”);
textBox1.SelectionStart = textBox1.Text.Length;
textBox1.ScrollToCaret();



Posted by 펀펀