首先开启listView1和listView2的多选(MultiSelect=True)
左边为listView1,右边为listView2,中间为移动按钮btnMove。
移动按钮点击事件为:
private void btnMove_Click(object sender, EventArgs e)
{
for(int i=0;i
listView2.Items.Add(listView1.SelectedItems[i].Text);
listView1.Items.Remove(listView1.SelectedItems[i]);
}
}
for (int i = 0; i
Dp2.Items.Add(Dp1.Items[i]);
}