Results 1 to 2 of 2

Thread: [RESOLVED] Listview selection

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Jul 2005
    Location
    England
    Posts
    79

    Resolved [RESOLVED] Listview selection

    I am using the following code:

    VB Code:
    1. Dim lv As LiveViewItem
    2. Label1.Text = lv.SubItems(2).Text

    Now I want to put the contents of the 3rd field on ListView1 into Label1, but this doesn't work, so how would I go around doing this?

    Cheers.

  2. #2
    Hyperactive Member fret's Avatar
    Join Date
    Sep 2004
    Posts
    472

    Re: Listview selection

    i assume that the property of the listview FullRowSelect is set to true, so it look like this.
    VB Code:
    1. Dim lv As ListViewItem = ListView1.SelectedItems(0)
    2.         TextBox1.Text = lv.SubItems(2).Text ' or could be a label control here

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