PC Review Forums Newsgroups Microsoft DotNet Microsoft Dot NET Framework Forms RichTextBox - how to disable AutoScroll on AppendText method

Reply

RichTextBox - how to disable AutoScroll on AppendText method

 
Thread Tools Rate Thread
Old 05-08-2005, 09:35 PM   #1
=?Utf-8?B?TXIuQ3liZXI=?=
Guest
 
Posts: n/a
Default RichTextBox - how to disable AutoScroll on AppendText method



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!
  Reply With Quote
Old 06-08-2005, 07:25 AM   #2
Lloyd Dupont
Guest
 
Posts: n/a
Default Re: RichTextBox - how to disable AutoScroll on AppendText method

you could try this control.
http://pluralsight.com/wiki/default...chTextBox2.html


haven't used it extensively yet, but it seems to provide many RichTextBoz
extension...

--
There are 10 kinds of people in this world. Those who understand binary and
those who don't.
"Mr.Cyber" <Mr.Cyber@discussions.microsoft.com> wrote in message
news:A78600DD-CE8D-41E9-8117-09888CE799D1@microsoft.com...
>
> 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!



  Reply With Quote
Old 10-08-2005, 05:27 PM   #3
=?Utf-8?B?Q2hyaXMgQmFkYWw=?=
Guest
 
Posts: n/a
Default RE: RichTextBox - how to disable AutoScroll on AppendText method


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?


"Mr.Cyber" wrote:

>
> 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!

  Reply With Quote
Reply



Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off