【发布时间】:2011-09-30 10:07:38
【问题描述】:
当我的 RichTextBox 充满文字时,我确实使用 GetScrollInfo 来获取 nMax、nMin 和 nPage。但在我清除所有文本(滚动条消失)后,nMax、nMin 和 nPage 仍然保留以前的数据。有没有办法让它自动更新GetScrollInfo?
【问题讨论】:
当我的 RichTextBox 充满文字时,我确实使用 GetScrollInfo 来获取 nMax、nMin 和 nPage。但在我清除所有文本(滚动条消失)后,nMax、nMin 和 nPage 仍然保留以前的数据。有没有办法让它自动更新GetScrollInfo?
【问题讨论】:
订阅活动RichTextBox.TextChanged:
private void myRichTextBox_TextChanged(object sender, EventArgs e)
{
// Get whatever you need in here
}
【讨论】: