What I am really looking for is a way to access the complete list all at one time. Looping thru the ListIndex works but I am looking for a faster way to get the list.One option would be to build a listbox class that has a custom array property to hold the selected items as they are selected. This is not a simple thing to do, but can be done.
You'd need to:
- Have an array property in the class to store the selected items
- On the MouseDown
-- store the selected item for future reference as the previously selected item
-- check the shift status:
--- If it's not shifted, empty the array and popuplate it with the selected item
--- If the Ctrl key was used, add/remove* the currently selected item
--- If the Shift key was used, add/remove* all the items between the previously selected item, and the currently selected item
* Based on whether or not the items were already in the array
Another option, if you have the room would be to use a Mover Box class. I'm guessing you'll find several examples in the files section here.
In closing, I'd just add that if you have
that many items in your list, you may want to re-evaluate the interface and/or database design.
kenweber
GCom2 Solutions
Microsoft Certified Professional