?
Solved

scroll bars in labels

Posted on 2004-11-09
4
Medium Priority
?
270 Views
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.SelectAll()
        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?

Thanks
0
Comment
Question by:itcopt
  • 3
4 Comments
 
LVL 86

Expert Comment

by:Mike Tomlinson
ID: 12536366
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.

~IM

0
 

Author Comment

by:itcopt
ID: 12536784
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

thanks
0
 
LVL 86

Accepted Solution

by:
Mike Tomlinson earned 150 total points
ID: 12536886
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.

~IM
0
 
LVL 86

Expert Comment

by:Mike Tomlinson
ID: 12570462
Just for reference and future views of this thread, the app in question is here:
http://www.experts-exchange.com/Programming/Programming_Languages/Dot_Net/VB_DOT_NET/Q_21189731.html

~IM
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I think the Typed DataTable and Typed DataSet are very good options when working with data, but I don't like auto-generated code. First, I create an Abstract Class for my DataTables Common Code.  This class Inherits from DataTable. Also, it can …
Creating an analog clock UserControl seems fairly straight forward.  It is, after all, essentially just a circle with several lines in it!  Two common approaches for rendering an analog clock typically involve either manually calculating points with…
Whether it be Exchange Server Crash Issues, Dirty Shutdown Errors or Failed to mount error, Stellar Phoenix Mailbox Exchange Recovery has always got your back. With the help of its easy to understand user interface and 3 simple steps recovery proced…
Is your OST file inaccessible, Need to transfer OST file from one computer to another? Want to convert OST file to PST? If the answer to any of the above question is yes, then look no further. With the help of Stellar OST to PST Converter, you can e…

862 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