Every time when I add text in my RichTextBox control via AppendText method -
the control
is autoscrolled to the end of text. I need avoid this effect. How can I do it?
Thanks in advance!
I'll very appreciate any ideas! :)
Lloyd Dupont - 06 Aug 2005 07:25 GMT
you could try this control.
http://pluralsight.com/wiki/default.aspx/Craig/RichTextBox2.html
haven't used it extensively yet, but it seems to provide many RichTextBoz
extension...

Signature
There are 10 kinds of people in this world. Those who understand binary and
those who don't.
>
> Every time when I add text in my RichTextBox control via AppendText
[quoted text clipped - 6 lines]
>
> I'll very appreciate any ideas! :)
Chris Badal - 10 Aug 2005 17:27 GMT
If you are having trouble with scrolling to the end of the text, you may try
something like:
int pos = richTextBox.SelectionStart;
richTextBox.AppendText(stuff);
richTextBox.SelectionStart=pos;
richTextBox.ScrollToCaret(); // try with and without this line
Note: when I just tried to append text to a RichTextBox, I did not see the
behavior that you mentioned. Are you calling ScrollToCaret() accidentally?
> Every time when I add text in my RichTextBox control via AppendText method -
> the control
[quoted text clipped - 3 lines]
>
> I'll very appreciate any ideas! :)