Hello, everyone!
I have a simple code
And I need not only remove selected items from listbox, but to delete them from directory, they belong to also
Could you show me in code how its possible to do?
I have a simple code
C#:
private void button7_Click(object sender, EventArgs e) // ??????? ???????????? ?????????? ???????? ?????? ?? ????????
{
ListBox.SelectedObjectCollection selectedItems = new ListBox.SelectedObjectCollection(listBox1);
selectedItems = listBox1.SelectedItems;
if (listBox1.SelectedIndex != -1)
{
for (int i = selectedItems.Count - 1; i >= 0; i--)
listBox1.Items.Remove(selectedItems[i]);
}
}
And I need not only remove selected items from listbox, but to delete them from directory, they belong to also
Could you show me in code how its possible to do?