所以,我有这段代码将文本写入label1。但是会覆盖原始文本,选择一个新值。作为先前值的另一个条目?label1 应该是这样的:一 - 二 - 三 -...
谢谢
private void OnSelectedIndexChanged(object sender, EventArgs e)
{
string text;
if (comboBox1.SelectedItem.ToString() == "one")
{
text = "one";
label1.Text = " - " + text;
}
else if (comboBox1.SelectedItem.ToString() == "two")
{
text = "two";
label1.Text = " - " + text;
}
else if (comboBox1.SelectedItem.ToString() == "three")
{
text = "three";
label1.Text = " - " + text;
}
else
{
...
}
}