Alex Rivera | Logout

How to constantly scroll to the end of text in multiline text box?

Asked 2012-01-18T20:40:27.867
9

I'm updating my text box with text using a timer. Each time timer ticks I'm being redirected to the beginning to the text typed in my multiline text box.

How to do this?

Edit
Report

1 Answer

12

I'd say that when you refresh, you could move the selection cursor to the end, then scroll the textbox 'til it's visible using ScrollToCaret.

That'll be something like

 yourtextbox.SelectionStart = yourtextbox.Text.Length
 yourtextbox.ScrollToCaret()
answered 2012-01-18T20:44:49.730

Your Answer