Click here to Skip to main content
13,046,562 members (73,103 online)
Rate this:
Please Sign up or sign in to vote.
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 1:50am
Updated 11-Feb-13 1: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
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web01 | 2.8.170713.1 | Last Updated 11 Feb 2013
Copyright © CodeProject, 1999-2017
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