This code is executed on a button click and used to remove the selected item from the ListBox.
private void _delFromListBox(object sender, EventArgs e)
{
for(int i=_rightListBox.Items.Count-1;i>=0;i--)
{
if(_rightListBox.Items[i].Selected)
{
_rightListBox.Items.Remove(_rightListBox.Items[i]);
}
}
No comments:
Post a Comment