We help IT Professionals succeed at work.

Content receiving window

flam79
flam79 asked
on
Medium Priority
325 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.
Comment
Watch Question

Mike TomlinsonHigh School Computer Science, Computer Applications, Digital Design, and Mathematics Teacher
CERTIFIED EXPERT
Top Expert 2009

Commented:
Are you trying to append a line to the end of the RTB?

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

Author

Commented:
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.
Mike TomlinsonHigh School Computer Science, Computer Applications, Digital Design, and Mathematics Teacher
CERTIFIED EXPERT
Top Expert 2009

Commented:
How have you made it readonly?

Author

Commented:
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.
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).
High School Computer Science, Computer Applications, Digital Design, and Mathematics Teacher
CERTIFIED EXPERT
Top Expert 2009
Commented:
Can't you just set Readonly = false, append the data, and then set Readonly = true?

Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts
Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.