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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

LISTVIEW RIGHTCLICK Select

Status
Not open for further replies.

NevG

Programmer
Oct 10, 2000
162
GB
Hi

Can somebody please tell me how to sleect an item via a right mouse click

I have tried all kinds of things so if someone can give me anassurd method it would be much appreciated

Ta

Nev G
 
Nev, I'm not sure what you want to accomplish, but you can do:

Private tvwButton as Integer

Private Sub lvwList_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
tvwButton = Button
End Sub

Private Sub lvwList_ItemClick(ByVal Item As MSComctlLib.ListItem)
If tvwButton = vbRightButton Then
lvwList.SetFocus
Item.Selected = True
End If
End Sub

This will select the item when you press the right button on top of it.
 
Use an event (right mouse click) to popup a popup menu from
a menu you have already defined.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top