PC Review


Reply
Thread Tools Rate Thread

Controlling RichTextBox scroll position in C#?

 
 
Charles Randall
Guest
Posts: n/a
 
      29th Aug 2003
I'm trying to write a little chat client, and I need to be able to force
my output textbox to autoscroll down to the bottom of the text. I'm
using a RichTextBox as an output area, and I can't for the life of me
find a way to force it to keep locked to the latest text that's been
added to the control. The only way I've found that might come close
involves using ScrollToCaret(), but this is an annoying workaround,
since I'd have to set the focus to the box, call the function, then
reset the focus to whichever control was in focus during the operation.

Does anyone know a better way to do this? Someone suggested that I use
a listbox instead, but I want to be able to use the benefits that the
RichTextBox offers (links, colored text, etc).

Any help is much appreciated.

Charles.

 
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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
RichTextBox control and controlling what text is selected by user. Wirestealth Microsoft Dot NET Framework Forms 0 14th May 2008 05:22 AM
RichTextBox scroll position =?Utf-8?B?SmVzcGVyLCBEZW5tYXJr?= Microsoft C# .NET 2 9th Sep 2007 11:15 PM
RichTextbox char position Peter Microsoft VB .NET 1 25th Apr 2005 12:08 PM
Position of the cursor in a RichTextBox =?Utf-8?B?SGVjdG9yIFkuIE1hcnRpbmV6?= Microsoft C# .NET 1 23rd Apr 2005 11:05 AM
RichTextBox Cursor Position GSX Microsoft VB .NET 3 12th May 2004 09:55 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 11:03 AM.