Miscellany
public text v1 · immutable Private Sub ToppingCheckChanged(ByVal sender As System.Object, ByVal e As EventArgs)
Me.ListBox1.Items.Clear() 'clear the ListBox before updating
For Each chkbox As CheckBox In Me.fpmeat.Controls
If chkbox.Checked Then
Me.ListBox1.Items.Add(chkbox.Text)
End If
Next
For Each chkbox As CheckBox In Me.fpveggie.Controls
If chkbox.Checked Then
Me.ListBox1.Items.Add(chkbox.Text)
End If
Next
Me.Label1.Text = "Number of toppings: " & Me.ListBox1.Items.Count.ToString()
End Sub