listBox1.SelectedItems.Clear();
listBox1.Items.RemoveAt(listBox1.SelectedIndex);谁能解释一下为什么第一个没有删除,第二个删除了
还有如果我用的
listView1
该怎么删除当前选中项 好像用Clear也不行
但是他有没有listView1.SelectedIndex 这个东西
该怎么做?
listBox1.Items.RemoveAt(listBox1.SelectedIndex);谁能解释一下为什么第一个没有删除,第二个删除了
还有如果我用的
listView1
该怎么删除当前选中项 好像用Clear也不行
但是他有没有listView1.SelectedIndex 这个东西
该怎么做?
int Index = 0;
Index = this.listView1.SelectedItems[0].Index;
listView1.Items[Index].Remove();