Autoscrolling in RichTextBox C # WinForms

How to do this, if I add some text, will RTB automatically scroll down?

Now I use:

conversationRtb.Rtf = tab.conversationRtb.Rtf; conversationRtb.SelectionStart = conversationRtb.Text.Length; conversationRtb.ScrollToCaret(); 

But it does not work well. Sometimes it does not scroll to the end, but ends on one line.

rtb scroll down bug

Sometimes this makes a big bias.

rtb scroll down bug

I can not find why. Is there any other way to scroll down? I found AutoScrollOffset , but there are no examples of how this works.

+8
c # scroll winforms richtextbox
source share
1 answer

You can set HideSelection value to false , AppendText will cause proper scrolling.

+7
source share

All Articles