Home Forums WinForms controls Other WinForms controls Smartcheckedlistbox Reply To: Smartcheckedlistbox

User (Old forums)
Post count: 23064

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 :

( ( CheckedListBoxItem )smartCheckedListBox1.Items[ 0 ]).Checked

CType( SmartCheckedListBox1.Items( 0 ), CheckedListBoxItem ).Checked

You need to cast it because the Items collection can contain other type of items, not just a CheckedListBoxItem. BTW, it is part of the Xceed.SmartUI.Controls.CheckedListBox namespace.

Imported from legacy forums. Posted by André (had 2879 views)