1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
| Private Sub CheckSet(lvw As ListView, chk As CheckBox)
Dim blnCheck As Boolean = False
Dim blnUncheck As Boolean = False
For Each lvwi As ListViewItem In lvwLista.Items
If lvwi.Checked = True Then
blnCheck = True
Else
blnUncheck = True
End If
Next
If blnCheck = False And blnUncheck = True Then
chk.CheckState = CheckState.Unchecked
ElseIf blnCheck = True And blnUncheck = False Then
chk.CheckState = CheckState.Checked
Else
chk.CheckState = CheckState.Indeterminate
End If
End Sub
|
沒有留言:
張貼留言