Solved

Content receiving window

Posted on 2006-10-19
6
263 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
6 Comments
 
LVL 86

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 86

Expert Comment

by:Mike Tomlinson
ID: 17770789
How have you made it readonly?
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

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 86

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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

A short article about a problem I had getting the GPS LocationListener working.
This is about my first experience with programming Arduino.

738 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