Click here to Skip to main content
Rate this: bad
Please Sign up or sign in to vote.
See more: VB.NET WinForm strings , +
How do I make a textbox auto scroll from left to right ?

Basically my problem is the text being entered into the textbox is too long to be visible. So perfect workaround would be to have the textbox autoscroll from left to right at a reasonably slow rate, so as to work without being annoying.
Code So far:
Public Class Form1
    Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
        TextBox1.Text = "This is a test message. Trying to figure out, how to get this textbox to autoscroll."
    End Sub
End Class
Picture of form:
Posted 11-Feb-13 2:50am
Edited 11-Feb-13 2:58am

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

You don't. It doesn't support "auto" scrolling like that.
You'd have to make your own version of the control to do it and implement all the custom painting of the text and probably a timer to control the speed of the scrolling.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 Sergey Alexandrovich Kryukov 175
1 Zoltán Zörgő 160
2 Peter Leow 100
3 CPallini 70
4 Ramza360 51
0 Sergey Alexandrovich Kryukov 9,568
1 OriginalGriff 6,901
2 Peter Leow 4,737
3 Zoltán Zörgő 4,404
4 CHill60 2,932

Advertise | Privacy | Mobile
Web04 | 2.8.150129.1 | Last Updated 11 Feb 2013
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100