How to turn off Auto-scrolling in a RichTextBox

T

Terry Olsen

The following code works fine in a TextBox for auto-scrolling:

If AutoScroll = True Then
txtChat.Select(txtChat.Text.Length, 0)
txtChat.ScrollToCaret()
End If

If I set AutoScroll to True then when text is appended to the TextBox, it
scrolls down to show it if necessary. When I set AutoScroll to false, it
doesn't scroll, allowing me to read whatever is currently visible.

With a RichTextBox, it seems to scroll down to the last text appended
regardless, even if I comment out the block of code above. What gives?

Can I make the RTB not scroll when text is appended?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top