locked
ListView items RRS feed

  • Question

  • Would it be possible for me to make items in the ListView to run a bit of code when they're double clicked (like in a folder view)? Code samples please?
    Friday, December 9, 2005 8:37 PM

Answers

  • Handle the ListView MouseDoubleClick event and use the HitTest method to return the list view item:

    Dim i as ListViewItem = ListView1.HitTest(e.Location).Item
    i.ForeColor = Color.Red

     
    -mark
    Program Manager
    Microsoft
    This post is provided "as-is"
    Friday, December 9, 2005 9:20 PM

All replies

  • It doesn't look like ListItemViews have any event associated with them at allSad
    Friday, December 9, 2005 8:49 PM
  • Handle the ListView MouseDoubleClick event and use the HitTest method to return the list view item:

    Dim i as ListViewItem = ListView1.HitTest(e.Location).Item
    i.ForeColor = Color.Red

     
    -mark
    Program Manager
    Microsoft
    This post is provided "as-is"
    Friday, December 9, 2005 9:20 PM