|
-
Apr 9th, 2002, 12:51 AM
#1
Thread Starter
Hyperactive Member
checkboxes on list
how do i check all the boxes avaliable on a listview or uncheck all at 1 time? is there a simple function for it or i have to use a for loop a check all 1 by 1?
-
Apr 9th, 2002, 01:10 AM
#2
PowerPoster
I think you have to use a loop and check all of them manually.
-
Apr 9th, 2002, 01:14 AM
#3
PowerPoster
Check/uncheck all items in a listview:
VB Code:
For i = 1 To ListView1.ListItems.Count
ListView1.ListItems(i).Checked = Not ListView1.ListItems(i).Checked
Next
-
Apr 9th, 2002, 02:58 AM
#4
Thread Starter
Hyperactive Member
can you explain the codes please......
i dont understand the logic
thanks alot it works
-
Apr 9th, 2002, 07:43 PM
#5
PowerPoster
With Comments:
VB Code:
For i = 1 To ListView1.ListItems.Count 'start the loop through all the items in the listview
ListView1.ListItems(i).Checked = Not ListView1.ListItems (i).Checked 'if the checkbox on listitem(i)
'is checked, it will uncheck it,
'if it is unchecked, it will check it
'Using Not is like saying set the value
'to the opposite of the current state
Next 'start the loop over...
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
|