I have a radio button and a listbox. After clicking on the radiobutton, a collection of items will be added into the listbox. I'm trying to go back to the collection I've started working on to edit a System.Collections.Specialized.StringCollection, but after running the program, the list of items has not updated. How would I fix this?
Here is the code I have:
Private Sub RB_Teacher_1_CheckedChanged(sender As Object, e As EventArgs) Handles RB_Teacher_1.CheckedChanged 'Displays Teacher Colleciton If RB_Teacher_1.Checked = True Then 'Clearazation of all previous items For Each item As String In My.Settings.TeacherCollection ListBox1.Items.Remove(item) Next 'Initialization of the required component informaiton For Each item As String In My.Settings.TeacherCollection ListBox1.Items.Add(item) Next End If End Sub