Rich Textbox Scrolling Down?

LiquidEnforcer

Newcomer
Joined
Apr 27, 2003
Messages
5
Hi, Im creating a chat client program in VB.NET. I need to know a few things. I have a Rich Textbox that will display any messages sent to the client. The problem is, when the text goes too far down it just keeps going out of sight and I have to manually scroll down to see it.

Is there any way to get this to scroll down by itself? Furthermore, I will only want it to scroll down if the scroll bar is already down. For example, if a user is scrolling up to read something they might have missed, I dont want it to scroll down automatically. That is until they scroll all the way down again, then it will scroll when text is added.

Let me know if this makes sense, help is much appriciated!
 
Then I have a quick-and-dirty one ;) but it works fine.

Every time when new text is added to your RT Box you set focus on it and send a Ctrl + End with SendKeys.

If this really makes sense, depends on the logic behind. Consider how the text is added. If it gets text automaticaly from somewhere else it might be a little frustrating for the user. Imagine you were looking for a special entry in the textbox and are reading this - and zapp - you jump to the last entry, because new text has been added. You are scrolling back - and zapp.... back to the end. :eek: :o

So maybe a better approach to that problem is, when you add a button to your form that gives the user the opportunity jump to the end of the text whenever he wants, and if there is a new entry you could highlight the buttons's text or make it even blink. Whatever you like.
 
Back
Top