|
-
October 15th, 2001, 01:45 AM
#1
list view
Hi,
Given a listview, how can I catch the right-click on a certain item only, not the whole listview area.
Thanks
Valery Iskarov Nikolov
Software Dynamics
-
October 15th, 2001, 02:55 AM
#2
Re: list view
'this works if you do not put a breackpoint in Mousedown
'event (or it will prevent the triggering of itemClick event!)
'Do not show msgboxes (or modal forms) in mousedown, too!
option Explicit
Dim intMouse as Integer
private Sub Command1_Click()
Dim i as Integer
With ListView1
for i = 1 to 10
.ListItems.Add , "a" & i, "a" & i
next i
End With
End Sub
private Sub ListView1_ItemClick(byval Item as MSComctlLib.ListItem)
If intMouse = 2 then
Debug.print Item.Key & " right-cliclked!"
End If
End Sub
private Sub ListView1_MouseDown(Button as Integer, Shift as Integer, x as Single, y as Single)
intMouse = Button
End Sub
Special thanks to Lothar "the Great" Haensler, Tom Archer, Chris Eastwood, TCartwright, Bruno Paris, Dr_Michael
and all the other wonderful people who made and make Codeguru a great place.
Come back soon, you Gurus.
The Rater
...at present time, using mainly Net 4.0, Vs 2010
Special thanks to Lothar "the Great" Haensler, Chris Eastwood , dr_Michael, ClearCode, Iouri and
all the other wonderful people who made and make Codeguru a great place.
Come back soon, you Gurus.
-
October 15th, 2001, 03:13 AM
#3
Re: list view
Special thanks to you, too !
Valery Iskarov Nikolov
Software Dynamics
-
October 15th, 2001, 04:18 AM
#4
Re: you're welcome
;-)
Have a nice day, Vin.
Special thanks to Lothar "the Great" Haensler, Tom Archer, Chris Eastwood, TCartwright, Bruno Paris, Dr_Michael
and all the other wonderful people who made and make Codeguru a great place.
Come back soon, you Gurus.
The Rater
...at present time, using mainly Net 4.0, Vs 2010
Special thanks to Lothar "the Great" Haensler, Chris Eastwood , dr_Michael, ClearCode, Iouri and
all the other wonderful people who made and make Codeguru a great place.
Come back soon, you Gurus.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|