Scroll to end of textbox

Ontani

Centurion
Joined
Mar 3, 2004
Messages
121
Location
Belgium
For some reason my textbox does not scroll to the end of its content.

my code:
Code:
    Private Sub txtConsole_TextChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles txtConsole.TextChanged
        txtConsole.SelectionStart = txtConsole.TextLength
        txtConsole.ScrollToCaret()
    End Sub
 
For some reason my textbox does not scroll to the end of its content.

my code:
Code:
    Private Sub txtConsole_TextChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles txtConsole.TextChanged
        txtConsole.SelectionStart = txtConsole.TextLength
        txtConsole.ScrollToCaret()
    End Sub
this is how i would do it
Code:
txtConsole.SelectionStart = txtConsole.Text.Length
txtConsole.SelectionLength = 0
txtConsole.ScrollToCaret()
 
Back
Top