Click here to Skip to main content
12,457,938 members (48,893 online)
Rate this:
 
Please Sign up or sign in to vote.
See more: VB string VB.NET VS2012
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:

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

1 solution

Rate this: bad
 
good
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.
  Permalink  

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
Web02 | 2.8.160826.1 | Last Updated 11 Feb 2013
Copyright © CodeProject, 1999-2016
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