https://i.stack.imgur.com/hWxOk.jpg 如果单击了属性1,则应在那些文本框中显示一组数据,如属性2和属性3。
答案 0 :(得分:0)
这是一个例子,我希望它有用:
private void listBox1_SelectedIndexChanged(object sender, System.EventArgs e)
{
// Get the currently selected item in the ListBox.
string curItem = listBox1.SelectedItem.ToString();
if(curItem == 1)
textBox1.Text = "anything";
else
//Do something
}