
-----------------------------------
Raku
Fri Sep 21, 2007 6:17 pm

[VB 2005 Express]Multiple Lines on a RichTextBox?
-----------------------------------
Ok..So I used the tool box to create a RichTextBox, and I'm trying to make it so it will output multiple lines when I click the button I'm using. I want it to output something like:

Level: lvl(the variable)
Attack: atk
Defense: def
Stamina: stm

etc. in the RichTextBox..how can I do this? Or is there something else I need to use to output something like this?

-----------------------------------
rdrake
Fri Sep 21, 2007 6:45 pm

RE:[VB 2005 Express]Multiple Lines on a RichTextBox?
-----------------------------------
Make sure the MultiLine property is set to true.  I believe you want to use the Append() method to add text to what's already there.rtb.MultiLine = true;
rtb.Append("Line 1\nLine 2");Pretty much a guess as I'm too lazy to whip open Visual Studio, but that sounds about right.

EDIT:  On second thought, it's probably more like this:

rtb.MultiLine = true;
rtb.AppendText("Level:  " + lvl + "\nAttack:  " + atk + "\nDefense:  " + def + "\nStamina:  " + stm);
