HOW DO I AUTOMATICALLY SCROLL TO THE BOTTOM OF A MULTILINE TEXT BOX?

Jeet Verma

Total Post:110

Points:776
Posted by  Jeet Verma
C# 
C#
 1221  View(s)
Ratings:
Rate this:
I have a multiline textbox and i want textbox to scroll down automatically whenever i add a new line. How to do it?
  1. ezra heywood

    Post:145

    Points:1019
    Re: How do I automatically scroll to the bottom of a multiline text box?

    Hi Jeet,

    You can use the following code snippet:

    myTextBox.SelectionStart = myTextBox.Text.Length;

    myTextBox.ScrollToCaret();

    which will automatically scroll to the end.

Answer

NEWSLETTER

Enter your email address here always to be updated. We promise not to spam!