Solved

Content receiving window

Posted on 2006-10-19
6
248 Views
Last Modified: 2010-04-16
does anyone know the best way to create a richTextbox (doesn't have to be a richtextbox) to receive large amounts of data line by line?

Ideally it will slowly scroll up pand it reads data in on the bottom..

I've used
richTextBox1.Select(this.richTextBox1.Text.Length, 0);
                richTextBox1.SelectedText = i.ToString();

but it keeps sounding my windows "error" or "Default beep" sound...


please help, no one seems to know why.
0
Comment
Question by:flam79
  • 3
  • 2
6 Comments
 
LVL 85

Expert Comment

by:Mike Tomlinson
ID: 17770522
Are you trying to append a line to the end of the RTB?

    richTextBox1.SelectionStart = richTextBox1.TextLength;
    richTextBox1.SelectionLength = 0;
    richTextBox1.SelectedText = i.ToString();
0
 

Author Comment

by:flam79
ID: 17770750
I figured out that it's because it's trying to change content in a "ReadOnly" box that is causing the beep.

Is there a work around, I do want to keep the field readonly.
0
 
LVL 85

Expert Comment

by:Mike Tomlinson
ID: 17770789
How have you made it readonly?
0
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 

Author Comment

by:flam79
ID: 17770862
made the richtextbox read only.

just richTextBox1.readonly = true;

so what happens is if you try to press a key in the box, it beeps.
so when you append to it using the method .selectedText = i; it causes it to beep.
0
 
LVL 3

Expert Comment

by:mostwired
ID: 17770894
Just make it non-read-only. Draw a label on top of the textbox, and set label text to nothing. Make sure label covers the textbox completely, and its Z factor is higher than the textbox (renders on top).
0
 
LVL 85

Accepted Solution

by:
Mike Tomlinson earned 500 total points
ID: 17770941
Can't you just set Readonly = false, append the data, and then set Readonly = true?
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
An introduction to basic programming syntax in Java by creating a simple program. Viewers can follow the tutorial as they create their first class in Java. Definitions and explanations about each element are given to help prepare viewers for future …
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …

707 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

18 Experts available now in Live!

Get 1:1 Help Now