I have a popupmenu on my listview, and that only fires when a person right clicks. I want it so that if the user right clicks it will still highlight the line they clicked on...possible?
Printable View
I have a popupmenu on my listview, and that only fires when a person right clicks. I want it so that if the user right clicks it will still highlight the line they clicked on...possible?
this is 100% out of this thread, but do you know what </vac> is? or msx?
...name looks farmiliar.
no clue what <vac> is...does anyone have a reasonable answer?
In the click event you should be able to add lstViewName.ListItems(Index).Selected = True
Only it isn't a click event.... use the Mouse up event and check for the right-click.
Part of the parameters to the event is the X & Y co-ord of the event. PAss those to the .HitTest method, which will pass back the item located under the cursor at the time of the mouseup. If it's nothing then the user didn't click over a usable listview item. If something does come back, use that object's (which should be a ListItem) .Selected property to select it.
I think that's right.... it's been a while since I've done it... but that does sound right - I might have the data type wrong on the .HitTest return.
Tg
-ps viper-- was that *really* necessary?
Thanks, that works perfect :wave:
What worked? His or mine? I'd like to know so that if I'm off base I don't do that again....
Tg
Both, i knew i had to put it in the mousedown event but with his code and such it worked