Results 1 to 4 of 4

Thread: ListView Control problem

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Jan 2001
    Location
    South Africa
    Posts
    28

    Question ListView Control problem

    Hi there

    I was wondering if anyone knows how to get the index of the Item that is selected in a ListView.

    Thanx in advance

  2. #2
    Frenzied Member trisuglow's Avatar
    Join Date
    Jan 2002
    Location
    Horsham, Sussex, UK
    Posts
    1,536
    VB Code:
    1. If ListView1.SelectedItems.Count > 0 Then
    2.             Dim lvi As ListViewItem = ListView1.SelectedItems(0)
    3. End If
    This world is not my home. I'm just passing through.

  3. #3

    Thread Starter
    Junior Member
    Join Date
    Jan 2001
    Location
    South Africa
    Posts
    28

    Thank you

    Thanx very much!!!!

  4. #4
    Frenzied Member trisuglow's Avatar
    Join Date
    Jan 2002
    Location
    Horsham, Sussex, UK
    Posts
    1,536
    I guess you've worked it out for yourself, but I just realised I never actually answered the question!!

    lvi.Index gives you what you want.


    BTW, I'll be in Fish Hoek in May next year. Is that anywhere near you?
    This world is not my home. I'm just passing through.

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