开发者

How to reference dynamically created checkedlistbox items in C#

开发者 https://www.devze.com 2023-01-03 12:20 出处:网络
I\'m trying to see if a particular item in a checkedlistbox is checked or not. I assumed referencing the item would be:

I'm trying to see if a particular item in a checkedlistbox is checked or not. I assumed referencing the item would be:

var checkBox = CheckBoxCheckedListBox1.Items[0];

But that retu开发者_如何学编程rns an object. Casting to a CheckBox throws an exeption.

Thanks!


Use bool checked = CheckBoxCheckedListBox1.GetItemChecked(i) here.

0

精彩评论

暂无评论...
验证码 换一张
取 消