|
-
August 11th, 1999, 08:40 AM
#1
How to delete multiple selection items from a listbox?
On a form, I have two listbox's. One has items in it, the other is empty. I want to be able to transfer items from one listbox to the other. That part I can do. My problem, is that I want to delete the item, that is being transferd, from it's original listbox. For a single selection, it poses no problem, but if you have a multiple selection enable, it is more complex. I cant use the index after I use the removeitem once, since all the indexes are changed. Example: I have five items (index 0 through 4). I select item 1 & 3. Once I transfer these items to the other listbox, I now want to delete them. If I use the removeitem method once for the item index 1, the other item previously selected (index 3) now becomes index 2! So how can I keep track of all this as I delete items? Is using a while(there are still selected items) conditional loop part of the solution?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|