ListView-ItemClick

  • Thread starter Thread starter Storm
  • Start date Start date
S

Storm

Try the MouseDown event. The e argument passed allows you to get the item that was clicked, from it's coordinates by using the GetItamAt method. Like this:

Private Sub ListView1_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles ListView1.MouseDown

Dim n As ListViewItem
n = ListView1.GetItemAt(e.X, e.Y)
MsgBox(n.Checked)

End Sub

Be warned, this only works when the ListView has the Veiw property set to Details

ListView1View.Details
 
Hi Storm,
Have you ever tried the event of listview (in PocketPC), fires when
pushing an item for a while, and a red circle appears ?
Thanks.
 
You mean "Tab&Hold" - try using the OnPopup Event (or similar)
When you add a PopupMenu to the ListView you can open up a Menu when you
tab&hold an item. Maybe the event is called too so you could do anything
you like

Boris
 
Thanks alot , Boris !

Boris Nienke said:
You mean "Tab&Hold" - try using the OnPopup Event (or similar)
When you add a PopupMenu to the ListView you can open up a Menu when you
tab&hold an item. Maybe the event is called too so you could do anything
you like

Boris
 
Back
Top