文章出處
文章列表
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 }
文章列表
全站熱搜