我想要 C++ Builder XE8 的代码
private void listBox1_SelectedIndexChanged(object sender, EventArgs e)
{
var str = listBox1.SelectedItem.ToString();
if (str == "A")
{
textBox1.Text = "You have selected A";
}
else if (str == "B")
{
textBox1.Text = "You have selected B";
}
else
{
textBox1.Text = "You have not selected A or B";
}
}