سؤال

I want to be able to set up a condition statement that checks if an item in checkedlistbox is both selected (highlighted in blue) and checked

How do I achieve this?

Note: this should be something like, if(checkedlistbox.items.selected = true AND checkedlistbox.items.checked = true) then...

هل كانت مفيدة؟

المحلول

you could do something like this

If CheckedListBox.CheckedIndices.Contains(CheckedListBox.SelectedIndex) then
    'whatever you want to do with CheckedListBox.items(CheckedListbox.SelectedIndex)
End If
مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top