Advertisement
5_2007-2008 Files/ File Controls/ Input/ Output #172780

Scroll TextBox to the end

This few rows of VB.NET code show how you can force TextBox control to scroll to the bottom.

AI

AI Summary: This codebase represents a historical implementation of the logic described in the metadata. Our preservation engine analyzes the structure to provide context for modern developers.

Source Code
original-source
Hello,
I have been trying to find this example all over the net, and finally got to the idea how to do this.
All that you need is TextBox control, with properties multiline and vertical or both scrollbars.
After the textbox is filled with text, these three lines will do the job:
TextBox1.SelectionStart = TextBox1.Text.Length
TextBox1.SelectionLength = 0
TextBox1.ScrollToCaret()
Nenad Kermeci
Upload
Original Comments (3)
Recovered from Wayback Machine