Answer the question
In order to leave comments, you need to log in
How to record all changes in combobox in richtextbox?
there is a richtextbox and a combobox in the combobox there are 3 values and when you click on each one, the corresponding text should be displayed: "You have selected 1 value, etc."
here is the code
private void richTextBox1_TextChanged(object sender, EventArgs e)
{
if(comboBox1.SelectedItem == comboBox1.Items[0])
{
richTextBox1.Text += "Вы выбрали размер по умолчанию!" + Environment.NewLine;
}
}
Answer the question
In order to leave comments, you need to log in
should have been added to the combobox, not the richtextbox
private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
{
if (comboBox1.SelectedItem == comboBox1.Items[0])
{
richTextBox1.Text += "Вы выбрали размер по умолчанию!" + Environment.NewLine;
}
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question