1

I want to do drag and drop between 2 listboxes, but be able to select multiple items in one listbox, and drag those across to the other listbox. I need to make sure I don't accidentally "drop" them back on the source listbox. I did this in Borland Builder C++ successfully, but can only drag and drop one item at a time using the C# methods. I have gone through all the possibilities here, but none of them gives me a nudge in the right direction. In BCB the DragDrop method had references to the Sender and Source objects, which you could use to determine where the item came from. You could then iterate through the selected list and move them across from source to destination as needed. Is there anything similar available in C# using windows forms, not WPF?

I hope I make some sense in this question!

1 Answer 1

1

Set the listbox property SelectionMode to SelectionMode.MultiExtended. To be able to select multiple items.

listBox.SelectionMode = SelectionMode.MultiExtended;
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.