|
-
Dec 16th, 2006, 11:45 AM
#1
Thread Starter
Addicted Member
[RESOLVED] [2005] CheckedListBox
Hi,
I have a CheckedListBox in my form.
How I can uncheck items (example: 5 items that I Checked) without click of the mouse, OR to check all the items?
Only with lines of code.
Thanks in advance
Last edited by yulyos; Dec 16th, 2006 at 12:25 PM.
-
Dec 16th, 2006, 01:09 PM
#2
Re: [2005] CheckedListBox
 Originally Posted by yulyos
Hi,
I have a CheckedListBox in my form.
How I can uncheck items (example: 5 items that I Checked) without click of the mouse, OR to check all the items?
Only with lines of code.
Thanks in advance
The CheckedIndices collection keeps a list of all checked items.
Use this to get/set the checked mark of the list item.
Pradeep
-
Dec 16th, 2006, 01:27 PM
#3
Thread Starter
Addicted Member
Re: [2005] CheckedListBox
Hi,
Thank you, I found the solution.
VB Code:
CheckedListBox1.BeginUpdate()
For i As Integer = 0 To CheckedListBox1.Items.Count - 1
'CheckedListBox1.SetItemCheckState(i, CheckState.Checked)
CheckedListBox1.SetItemCheckState(i, CheckState.Unchecked)
Next
CheckedListBox1.EndUpdate()
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|