Valhalla Legends Archive

Programming => General Programming => Visual Basic Programming => Topic started by: Lenny on March 06, 2004, 03:50 AM

Title: Listview RightClick
Post by: Lenny on March 06, 2004, 03:50 AM
A Listview control by default enables the right mouse button to select items.

Does anyone know the name of this property?  My channel ListView isnt allowing me to select items using right click, I believe a setting has been altered but I dont know the name of its property.
Title: Re:Listview RightClick
Post by: R.a.B.B.i.T on March 12, 2004, 07:02 PM
I normally just use "If Button = 2 Then" on the click sub.
Title: Re:Listview RightClick
Post by: Lenny on March 12, 2004, 08:54 PM
I have no problem showing the mnu's upon a right click...but the right click doesn't select the username thats its pointing to, the username can only be selected thru the left button for some reason...
Title: Re:Listview RightClick
Post by: g0dFraY on March 15, 2004, 06:50 PM
I seem to have run into the same problem. Could it be that using menus causes this. Its not a major problem for me but i would like to know why this happens.
Title: Re:Listview RightClick
Post by: ChR0NiC on March 16, 2004, 02:48 PM
This is quite odd in my mind....I am not getting this problem

Here is what I am using for the menu pop up

Private Sub ChannelList_MouseUp(Button As Integer, Shift As Integer, X As Single, y As Single)
If Button = 2 Then
   PopupMenu mnuOptions
End If
End Sub
Title: Re:Listview RightClick
Post by: Eli_1 on March 16, 2004, 03:11 PM
Quote from: Lenny on March 12, 2004, 08:54 PM
I have no problem showing the mnu's upon a right click...but the right click doesn't select the username thats its pointing to, the username can only be selected thru the left button for some reason...

note that his problem wasn't to do a popup menu...

his problem is that, he wants to right click on a username and bring up a menu on that name, but when you right click, you don't actually select the name...
Title: Re:Listview RightClick
Post by: ChR0NiC on March 16, 2004, 03:35 PM
Quote from: Lenny on March 12, 2004, 08:54 PM
I have no problem showing the mnu's upon a right click...but the right click doesn't select the username thats its pointing to, the username can only be selected thru the left button for some reason...


Quote from: Eli_1 on March 16, 2004, 03:11 PM
note that his problem wasn't to do a popup menu...
his problem is that, he wants to right click on a username and bring up a menu on that name, but when you right click, you don't actually select the name...

Works perfectly fine for me.......always has
Title: Re:Listview RightClick
Post by: Adron on March 16, 2004, 04:52 PM
Maybe some people are showing the menu on click / down and others are showing it on up?
Title: Re:Listview RightClick
Post by: ChR0NiC on March 16, 2004, 06:17 PM
Quote from: Adron on March 16, 2004, 04:52 PM
Maybe some people are showing the menu on click / down and others are showing it on up?

Yeah I was thinking the same thing, does this solve your problem guys?
Title: Re:Listview RightClick
Post by: Lenny on March 16, 2004, 08:36 PM
Yes, it was mouse down that was affecting it, I used mousedown because in my opinion it was more efficient considering how it works....

I also developed a somewhat temporary solution, by manipulating the x, y coordinates of where the mouse actually was and dividing it by the size of 1 item in the listview....Unfortunately it proved to be inaccurate for large lists...