private void Cottage_Click(object sender, EventArgs e)
        {
            richTextBox1.Text = "create cottage";
            richTextBox1.Text = "create Bob";
        }

So when I run the code what gets printed is Bob of course I knew this would happen from the moment I wrote the code but I do not know what to put instead, I want to be able to print both on two seperate lines also I will have many other buttons printing into this same RichTextBox so I need to know how to move from my curent line and print on the next line everytime I click on the button....Thank you :)

Also How would I make a If statement where if the button is clicked then it prints "Hola" into the richtextbox?

Edited 2 Years Ago by Pilot122x

Try adding \n to your string. If that doesn't work try \r\n.

Also How would I make a If statement where if the button is clicked then it prints "Hola" into the richtextbox?

First step would be to create an event handler for the button click event. Then put the if statement in there.

Edited 2 Years Ago by tinstaafl

Yes, I find that the AppendText method does work perfectly and "tinstaafl" thanks, found out what I was trying to do wouldve given me crazy syntax errors without the Event

This question has already been answered. Start a new discussion instead.