09-18-2007 09:48 PM
09-18-2007 10:00 PM
09-18-2007 10:26 PM
09-18-2007 11:39 PM
09-19-2007 12:37 AM
09-19-2007 02:11 PM
Hello Simon,
If I am understanding correctly, you want the item to not be added to the selected listbox if the selection in the first listbox is disabled. If this is the case, then you will need to check which items are disabled in the listbox before outputting them to be added to the selected listbox. Right now your code for all will take every value inside the listbox and add it, including the ones that have been disabled. Disabling the item will just grey it out and not let the user select it, but the item name is still there. You could just read the disabled items in the case when All is pressed and not include those numbers in the items to be added to the selected listbox.
Also, as Dennis mentioned, you may be better off with an event-based structure, since it would be more efficient and make your code a little easier to understand. I hope this is helpful.
09-20-2007 02:12 AM