X
X
Xveeder2017-08-28 13:35:43
C++ / C#
Xveeder, 2017-08-28 13:35:43

How to display data from variables in richtextbox while working on the application?

In general, the question is of the following nature, it is necessary that the data from the variable be logged into the rich textbox.
Some example:

for (int i = 0; i < 85; i++)
            {
                string log = "Шаг номер: " + i;
                richTextBox1.Text += log.ToString() + Environment.NewLine;
            }

The code is processed, but it is displayed only after the entire program has been completed, and I need it to record all iterations during operation.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
L
leremin, 2017-08-28
@Xveeder

for (int i = 0; i < 85; i++)
{
string log = "Step number: " + i;
richTextBox1.Text += log.ToString() + Environment.NewLine;
Application.DoEvents();
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question