Hello, I'm developing a dental software which one of the functions is to select a tooth on a button and add the name of this tooth in a textbox. So far, no problem, but the point is that this textbox is about observations, and I would like the name of each selected tooth to be added in the textbox on different lines and not side by side. Then as each button referring to each tooth is selected it goes adding the name of the teeth one in each row. For example, when I click on button1 the text "Bot1" is added in the textbox and so on, the problem is that if I click on more than one button the text should go to different lines and not the same. This is what I would like but I can not develop a logic to do this does anyone have any ideas?
It follows the click event I'm using on the buttons:
private void button1_Click(object sender, EventArgs e)
{
string Texto = txtObservacao.Text;
txtObservacao.Text += "Terceiro Molar Inf.Direito (48):";
if (btnMolar48.BackColor == Color.FromArgb(150, Color.LightSeaGreen))
{
btnMolar48.BackColor = Color.Transparent;
txtObservacao.Text = Texto.Replace("Terceiro Molar Inf.Direito (48):", "");
}
else
{
btnMolar48.BackColor = Color.FromArgb(150, Color.LightSeaGreen);
}
}
private void btnMolar47_Click(object sender, EventArgs e)
{
string Texto = txtObservacao.Text;
txtObservacao.Text += "\n" + "Segundo Molar Inf.Direito(47):";
if (btnMolar47.BackColor == Color.FromArgb(150, Color.LightSeaGreen))
{
btnMolar47.BackColor = Color.Transparent;
txtObservacao.Text = Texto.Replace("Segundo Molar Inf.Direito(47):", "");
}
else
{
btnMolar47.BackColor = Color.FromArgb(150, Color.LightSeaGreen);
}
}'
Thank you.