tags:

views:

82

answers:

3

I want to be able to display process update information to a user. The way I want to do this is by having a control on the main winform that (at a yet undecided process) keeps the user informed via text of what the status is. I want this text to scrollup (within a control) as more text is added.

What is the best way to achieve this?

+2  A: 

Well, a multiline TextBox or RichTextBox will do the job just fine. Use its AppendText() method.

I cannot judge the value of this info from your question. In general, avoid assuming the user is interested in implementation details, especially when there's a lot of it. A ProgressBar is almost always the most appropriate progress indicator. Maybe a Label or a StatusStrip to give some context.

Beware of the cost of Control.BeginInvoke() to update the controls.

Hans Passant
+3  A: 

Use a multiline TextBox, like so:

myTextBox.Multiline = true;

And update it while scrolling to the bottom, like so:

myTextBox.Text += "My message" + System.Environment.NewLine;
myTextBox.SelectionStart = myTextBox.Text.Length;
myTextBox.ScrollToCaret();
BaBu
A: 

Thanks for the answers guys....works a charm!

darren young
Then please Accept the one you found most helpful.
Henk Holterman
Also responses to an Answer should be added as a comment, not as another answer.
Bill W
Sorry.....fairly new to the site. Have accepted an answer.
darren young