when my RichTextBox full of words, i did use GetScrollInfo to get nMax, nMin & nPage开发者_如何学Python. but after i clear all text (scroll bar is gone), the nMax, nMin & nPage still remain the previous data. is there any way to make it auto update the GetScrollInfo?
Subscribe to the event RichTextBox.TextChanged
:
private void myRichTextBox_TextChanged(object sender, EventArgs e)
{
// Get whatever you need in here
}
精彩评论