Link to home
Start Free TrialLog in
Avatar of flam79
flam79

asked on

Content receiving window

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.
Avatar of Mike Tomlinson
Mike Tomlinson
Flag of United States of America image

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

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

ASKER

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.
How have you made it readonly?
Avatar of flam79

ASKER

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).
ASKER CERTIFIED SOLUTION
Avatar of Mike Tomlinson
Mike Tomlinson
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial