In my C# Class I have a Windows Form with 4 checkBoxes and 1 listBox. Three of the checkBoxes are Ford, Chevrolet, and Cadillac; and the 4th is All.
Checking each box displays that make of car OR all cars. Unchecking each Box removes that car from the listbox. So, if you check Ford, Chevrolet, and Cadillac AND THEN unCheck Ford you would be left with only Cadillac and Chevrolet.
My problem is the ALL. When I click ALL four checkBoxes the ALL list is appended to the list of the other three and when you uncheck all (using ...items.clear()) it removes everything.
The Demo program for this project Displays ALL by itself and it seems to operate independently of the other 3. Like it is either overlaying the list OR there is another listBox of a different name but the exact same size that is only visible when the allCheckBox.Checked == true.
Is there a way to do this without a second listbox?