You can use the SelectedItems property. The following example will use the
first selected item from the listview (index 0):
TextBox1.Text = ListView1.SelectedItems(0).Text
TextBox1.Text = ListView1.SelectedItems(0).SubItems(0).Text
You can select items but not individual subitems. The selected items are
returned by the Listview's SelectedItems property. Each ListviewItem has a
SubItems property that returns the subitems.
You can use the SelectedItems property. The following example will use the
first selected item from the listview (index 0):
TextBox1.Text = ListView1.SelectedItems(0).Text
TextBox1.Text = ListView1.SelectedItems(0).SubItems(0).Text
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.