Double-Click the listview item with checkbox

Y

YXQ

When double-click the listview item with checkbox (View = Details), the
checkbox will be checked or unchecked, how to disable this behavior? thank
you.
 
R

Rashdan

When double-click the listview item with checkbox (View = Details), the
checkbox will be checked or unchecked, how to disable this behavior? thank
you.


Private Sub ListView1_DoubleClick(ByVal sender As Object, ByVal e As
System.EventArgs) Handles ListView1.DoubleClick
If ListView1.SelectedItems.Count > 0 Then
If ListView1.SelectedItems.Item(0).Checked = True Then
ListView1.SelectedItems.Item(0).Checked = False
Else
ListView1.SelectedItems.Item(0).Checked = True
End If
End If

End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top