C#中一个RichTextBox,当新写入内容时,超过当前显示区域后,自动滚动到最低端,方便查看内容。

private void txtInfo_TextChanged(object sender, EventArgs e)
{
    txtInfo.SelectionStart = txtInfo.Text.Length; //Set the current caret position at the end
    txtInfo.ScrollToCaret(); //Now scroll it automatically
}

相关文章:

  • 2021-08-13
  • 2022-02-17
  • 2021-11-08
  • 2022-12-23
  • 2022-12-23
  • 2022-03-04
猜你喜欢
  • 2022-12-23
  • 2021-08-29
  • 2022-12-23
  • 2022-12-23
  • 2022-01-21
  • 2022-12-23
  • 2021-06-23
相关资源
相似解决方案