Results 1 to 4 of 4

Thread: how do i autoselect the first column in a listview?

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Jun 1999
    Location
    Brisbane, Qld, Australia
    Posts
    78

    Question

    Hi,

    I want to have a command button that will autoselect all subitems in the first column of the listview? Anyone know how to do this? Thanx in advance.


  2. #2
    Addicted Member
    Join Date
    Apr 2000
    Location
    Sheffield, England.
    Posts
    136
    You can't.

    You can only select rows in listviews - not columns.

    If you need to select columns, then you'll need to use another control. I forget exactly which but it's one of the Microsoft ones.
    Visual Basic 6 Enterprise Edition + SP4

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Jun 1999
    Location
    Brisbane, Qld, Australia
    Posts
    78
    Yes I made a mistake, what I meant is how do I autoselect all rows. I have full row select on already but how do I auto select all rows in the listview under one command button?

  4. #4
    Addicted Member
    Join Date
    Apr 2000
    Location
    Sheffield, England.
    Posts
    136
    Code:
    Dim Count as Long
    
    For Count = 1 to ListView1.ListItems.Count
        Listview1.ListItems(Count).Selected = True
    Next
    Visual Basic 6 Enterprise Edition + SP4

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