User Profile

Collapse

Profile Sidebar

Collapse
amin grf
amin grf
Last Activity: May 23 '23, 08:47 AM
Joined: May 17 '23
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • Previous code when listview sort order change also change it's index, so some items will not be checked or unchecked. In this code I used Selected item. and added a list to store checked items.
    Code:
        Dim checklist As New List(Of String)()
        Private Sub lvwBooks_MouseUp(ByVal sender As System.Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles lvwBooks.MouseUp
            Try
                If Not lvwBooks.Items.Count
    ...
    See more | Go to post

    Leave a comment:


  • Thanks for sharing, I've added an option to select only one item at a time, in Mouse_Up event.
    Code:
     Private Sub ListView1_MouseUp(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles ListView1.MouseUp
            Dim cellLoc As MyCell
            cellLoc = WhichCell(ListView1, e.X, e.Y)
    
            If cellLoc.Col = 2 Then
                'check once
                ListView1.Items(check1_indx).SubItems(1).Text
    ...
    See more | Go to post

    Leave a comment:

No activity results to display
Show More
Working...