8

How can I do that if I append some text the RTB will automatically scroll down?

Now I'm using:

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

But it isn't working well. Sometimes it doesn't scroll to end but one line before end.

rtb scroll down bug

Sometimes it makes a big offset.

rtb scroll down bug

I cannot find why. Is there any another way how to scroll down? I've found AutoScrollOffset but no examples how it works.

4

1 回答 1

8

您可以调整HideSelection value to false,AppendText 将触发正确的滚动。

于 2012-10-05T15:28:24.620 回答