Software Development Network>> Visual C#>> Inserting multiple lines in textbox
Perhaps you could try this, which I am currently using to show variable values in a summary box for testing reasons.I've got a SummaryBox (which is a "listbox")
SummaryBox.Items.Add ("");SummaryBox.Items.Add ("Equipment Type: " + EquipmentType.Text);SummaryBox.Items.Add ("----------------------------------------");SummaryBox.Items.Add ("Transaction Type: " + transactiontype.Text);On the button click, the above code is ran and the proper display shows in the SummaryBox. Hope this helps!-Corby-
Inserting multiple lines in textbox
John W. Smith
string[] lines = new string[] { "Hello", "World" };
textBox1.Lines = lines;
List<string> lines = new List<string>();
lines.Add("Hello");
lines.Add("World");
textBox1.Lines = lines.ToArray();
DaveQ2
Perhaps you could try this, which I am currently using to show variable values in a summary box for testing reasons.
I've got a SummaryBox (which is a "listbox")
SummaryBox.Items.Add ("");
SummaryBox.Items.Add ("Equipment Type: " + EquipmentType.Text);
SummaryBox.Items.Add ("----------------------------------------");
SummaryBox.Items.Add ("Transaction Type: " + transactiontype.Text);
On the button click, the above code is ran and the proper display shows in the SummaryBox.
Hope this helps!
-Corby-
Toni Chaffin
You can use
Environment.NewLine;
to add a new line (by code)
HTH.
Bye.