Results 1 to 3 of 3

Thread: Syntax for setting selected item

  1. #1

    Thread Starter
    Frenzied Member Blobby's Avatar
    Join Date
    Oct 2001
    Location
    England
    Posts
    1,512

    Syntax for setting selected item

    What is the syntax/command for manually setting a selected row in a ListView?

    The trouble with VB is it allows you to select a property that is illegal at runtime..because it doesnt evaluate the context you are trying to use the property in. There seems to be several properties so that I can say highlight line 10 under a certain circumstance but ill be damned if i can find out the syntax for the command.

    Any help would be greatly received.
    There are 3 types of people in this world.........those that can count, and those that can't.

    Blobby

  2. #2
    Fanatic Member
    Join Date
    Oct 2001
    Location
    didn't decide yet
    Posts
    566
    u can try this
    Code:
    For i = 0 To Me.lst.ListItems.Count - 1
        Me.lst.ListItems(i + 1).Selected = True
    Next i

  3. #3

    Thread Starter
    Frenzied Member Blobby's Avatar
    Join Date
    Oct 2001
    Location
    England
    Posts
    1,512

    AHA!

    I see ive been going about it the wrong way!

    Thanks very much for your reply. Sorted me out bigtime. This board is great for us beginners! Thanks

    x
    There are 3 types of people in this world.........those that can count, and those that can't.

    Blobby

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