Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to get value from list view when DblClick ? 1

Status
Not open for further replies.

mnsb

Programmer
Joined
Oct 4, 2003
Messages
1
Location
MY
Hello. I've created a list view which contains Contact Names. How can I get the Contact Name when they double click on the item in the list? Thanks..
 
You put the code in the ItemClick event which returns the ListItem as a parameter and call ItemClick from the DblClick event.

Paul Bent
Northwind IT Systems
 
If u try to use the ItemClick Event when multi selecting...it will return Null.

Another option is to try the Click or DblClick event.

U'll have to trap null if nothing is selected
 
All you need to do is put in a double click event on the List View. To find out which icon they clicked on, just use the .SelectedItem.Text property. If .SelectedItem.Text is "" then they have not selected anything, ie

Private Sub ListView1_DblClick()
Msgbox ListView1.SelectedItem.Text
End Sub
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top