Click here to Skip to main content
Rate this: bad
good
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:
 
http://oi49.tinypic.com/2wdc09v.jpg
Posted 11-Feb-13 2:50am
Edited 11-Feb-13 2: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
0 Sergey Alexandrovich Kryukov 275
1 OriginalGriff 230
2 BillWoodruff 173
3 CPallini 155
4 Kamal Rocks 144
0 OriginalGriff 5,655
1 DamithSL 4,506
2 Maciej Los 3,997
3 Kornfeld Eliyahu Peter 3,480
4 Sergey Alexandrovich Kryukov 3,180


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