Results 1 to 3 of 3

Thread: ListView Multiselection

  1. #1

    Thread Starter
    Member
    Join Date
    Mar 2001
    Posts
    56

    ListView Multiselection

    Hello,
    I do have a listview control in my form with a checkbox, and I would like to display just the selected items, by clicking a command button.
    How can I do this?
    Thank you,

  2. #2
    nullus
    Guest
    what do you mean just display the selected items? like remove all the items that aren't selected?

  3. #3
    Fanatic Member
    Join Date
    Nov 2000
    Location
    Sydney Australia
    Posts
    804
    Here is some code to play with, you should be able to get what you want by modifying it.

    VB Code:
    1. Function CountSelectItem(lv As ListView) As Integer
    2.  Dim Count As Integer
    3.  Dim i As Integer
    4.  
    5.  Count = 0
    6.  For i = 1 To lv.ListItems.Count
    7.   If lv.ListItems(i).Selected Then
    8.      Count = Count + 1
    9.   End If
    10.  Next i
    11.  CountSelectItem = Count
    12. End Function

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width