xinz
xinz

Reputation: 1

Richtextbox vertical scrollbar

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

Answers (1)

Dennis Traub
Dennis Traub

Reputation: 51674

Subscribe to the event RichTextBox.TextChanged:

private void myRichTextBox_TextChanged(object sender, EventArgs e)
{
    // Get whatever you need in here
}

Upvotes: 2

Related Questions