Reputation: 1
when my RichTextBox full of words, i did use GetScrollInfo to get nMax, nMin & nPage. 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?
Upvotes: 0
Views: 733
Reputation: 51674
Subscribe to the event RichTextBox.TextChanged
:
private void myRichTextBox_TextChanged(object sender, EventArgs e)
{
// Get whatever you need in here
}
Upvotes: 2