Results 1 to 3 of 3

Thread: Adding a Check Box to a Listview

  1. #1

    Thread Starter
    New Member
    Join Date
    Mar 2000
    Location
    Canada
    Posts
    2

    Post

    I read the article on adding a checkbox to a listview and it works great. Does anyone know how to change the checked value in code? For example: If I wanted to default all listitems to have a checked status.

  2. #2
    PowerPoster Chris's Avatar
    Join Date
    Jan 1999
    Location
    K-PAX
    Posts
    3,238

    Post

    Will this work for you?

    Dim cnt As Integer
    ListView1.Checkboxes = True

    For cnt = 1 To ListView1.ListItems.Count
    ListView1.ListItems.Item(cnt).Checked = True
    Next


  3. #3

    Thread Starter
    New Member
    Join Date
    Mar 2000
    Location
    Canada
    Posts
    2

    Post


    Will this work for you?

    Dim cnt As Integer
    ListView1.Checkboxes = True

    For cnt = 1 To ListView1.ListItems.Count
    ListView1.ListItems.Item(cnt).Checked = True
    Next


    That would work just fine if there was a property called Checked, but ListView1.ListItems.Item(cnt).Checked does not exist as a property. The above example is exactly how I would like to use it though.

    Any other suggestions?

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