There is a cycle at the end of which the value is written to the textbox. I need to write the values in a new line, and not overlap each other.
I tried this:
textBox2->Text = Environment::NewLine + m;
Advance ATP.
There is a cycle at the end of which the value is written to the textbox. I need to write the values in a new line, and not overlap each other.
I tried this:
textBox2->Text = Environment::NewLine + m;
Advance ATP.
Replace =
with +=
.
UPD: Code
textBox2->Text += Environment::NewLine + m;
where m
is a string, should change the text inside the control, namely: add a line break and a string m
. In order to see the results, the Multiline
property must be set to true
.
Another option is to call the AppendText()
method:
textBox2->AppendText(Environment::NewLine + m);
Maybe someone will help: I found this solution for Powershell, through the method AppendText. I think that is suitable for .net
$button1_Click = {buttonclick} function buttonclick ($parameter1, $parameter2) { $b = "" $serv = Get-Process | where { $_.mainWindowTItle } | %{ $_.Name } ForEach ($a in $serv) { $a.ToString() $b = $a.ToString() + "`n" $textbox1.AppendText($b) }
Source: https://ru.stackoverflow.com/questions/72947/
All Articles