Categories: MSDN / DotNet / Java / Scripts / Linux / PHP Ask - La ask - La Answer

How to check all items in a checkedlistbox

Hi,
I'm new to VB.Net and would like to know how to check all items in a checkedlistbox.
Any help would be greatly appreciated.
Thanks
[167 byte] By [jobartley515] at [2007-11-11 8:08:52]
# 1 Re: How to check all items in a checkedlistbox
One quick way of doing this is as follows:

For i As Integer = 0 To CheckedListBox1.Items.Count - 1
CheckedListBox1.SetItemChecked(i, True)
Next
AdamP at 2007-11-11 21:47:57 >
# 2 Re: How to check all items in a checkedlistbox
Thanks for your quick reply.
jobartley515 at 2007-11-11 21:49:03 >