How do you acces the checked property of each item in a Smartckedlistbox? Suppose I have the following code…
Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) _ Handles MyBase.Load
Dim xInt As Integer
For xInt = 1 To 10 SmartCheckedListBox1.Items.Add(xInt) Next
When the form loads it fills a smartcheckedlistbox with 10 items, now when the user presses a button the form should display a message whith the items in the smartcheckedlistbox which checkbox item are in a checked state (Did I make myself clear?). Thanx in advance for the help!
Imported from legacy forums. Posted by cursositca (had 2427 views)
You have to verify the Checked property on the item. However, since you are creating the items at runtime, you don’t have a direct reference to the item, so you will need to cast the item to a CheckedListBoxItem to get the property :