[英]How to move move selected items from one C1List to another in C#?
C1List component is something similar to listBox. C1List组件类似于listBox。 I have button and event for that button:
我有按钮和该按钮的事件:
private void btnNavigateLeft_Click(object sender, System.EventArgs e)
{
if (lbRight.SelectedIndex != -1)
{
lbLeft.InsertItem();
lbRight.RemoveItem(lbRight.SelectedIndex);
}
}
Any idea how to do that? 任何想法如何做到这一点?
Try this, 尝试这个,
lst_2.Items.Add(lst_1.SelectedItem);
lst_1.Items.Remove(lst_1.SelectedItem);
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.