scroll bars in labels

Posted on 2004-11-09
Last Modified: 2010-04-23
I am working on a project that needs a rich text box to scroll up and down when to see all the text. I know how to use the text box syntax
        TextBox1.SelectionStart = TextBox1.SelectionLength
But I am working with a lable and I'm getting the  error Select all is not a member of label....

What is the syntax for a rich text box for scrolling?

Question by:itcopt
    LVL 85

    Expert Comment

    by:Mike Tomlinson
    Might I be the first to say, eh?!

    You are right, there are no Select() methods for a Label since a Label is not editable.  What does a Label have to do with Scrolling a RichTextBox?

    If you want to make a "scrollable label" then place a Panel on your form and set its AutoScroll Property to True.  Then place the Label inside the Panel and set its location to 0,0.  If the label is larger than the panel, scrollbars will appear.

    What exactly do you need to do with the RichTextBox though?  Explain more and perhaps we can help.



    Author Comment

    It is a label only. not rich textbox
    This is a calculator with a scrolling tape.
    I need the label to scroll down when the lable is full

    LVL 85

    Accepted Solution

    You can't scroll a label unless you place it in a Panel as I described above.

    In the Calculator app I gave you, I demonstrated how to use a TextBox as a continuos scrolling text area.  You just set the MultiLine property to True, the ScrollBars property to Vertical, the ReadOnly property to True, and then use then the .AppendText() method to add things to the end of it and have the TextBox automatically scroll to the bottom.

    LVL 85

    Expert Comment

    by:Mike Tomlinson
    Just for reference and future views of this thread, the app in question is here:


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Better Security Awareness With Threat Intelligence

    See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

    This article explains how to create and use a custom WaterMark textbox class.  The custom WaterMark textbox class allows you to set the WaterMark Background Color and WaterMark text at design time.   IMAGE OF WATERMARKS STEPS Create VB …
    If you're writing a .NET application to connect to an Access .mdb database and use pre-existing queries that require parameters, you've come to the right place! Let's say the pre-existing query(qryCust) in Access takes a Date as a parameter and l…
    how to add IIS SMTP to handle application/Scanner relays into office 365.
    Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…

    760 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    12 Experts available now in Live!

    Get 1:1 Help Now