Click here to Skip to main content
15,884,927 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
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:

VB
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:

http://oi49.tinypic.com/2wdc09v.jpg
Posted
Updated 11-Feb-13 1:58am
v3

1 solution

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.
 
Share this answer
 

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900