잠토의 잠망경

C# 에서 TextBox 자동 스크롤 하기 (auto scroll) 본문

공부/C sharp

C# 에서 TextBox 자동 스크롤 하기 (auto scroll)

잠수함토끼 2008. 7. 3. 10:40
this.txtInformation.AppendText(System.Environment.NewLine);
                this.txtInformation.AppendText("---------------------------------------------");
                this.txtInformation.AppendText(System.Environment.NewLine);
                this.txtInformation.AppendText("내용");
                this.txtInformation.ScrollToCaret();

참고 : Test 했을때, this.txtInformation.Text += "내용".... 이런식으로 += 을 사용했을 경우에는 스크롤이 되지 않고 AppendText 를 사용해야만 스크롤이 됨을 확인했다.

 출처: http://cafe.naver.com/ilikefox.cafe?iframe_url=/ArticleRead.nhn%3Farticleid=680
작성자:
알롹퐉스(iam2010)

-----------------------------------------------------------------------------------------------
추가
  if(Register[88]!=0)
  {
                    this.richTextBox1.AppendText(Convert.ToString(Convert.ToChar(Register[88])));
                    this.richTextBox1.ScrollToCaret();
  }

Comments