How do I automatically scroll to the bottom of a multiline text box?

Total Post:110

Points:776

C# 
C#
 1674  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. 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

Please check, If you want to make this post sponsored

You are not a Sponsored Member. Click Here to Subscribe the Membership.