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

Right-click menu? 3

Status
Not open for further replies.

Tommyhat

Programmer
Sep 10, 2004
96
CA
I'm not quite sure this is possible, but it would make my flexgrid alot more user friendly.

Can i add code to bring up a right click menu when someone right clicks on my flex grid. I dont know how good my terminology is, but i want something like what would happen if you right clicked somewhere on this page and the little grey menu with back, forward, save bacground as, etc.

Even if there's a better name for what im looking for, that would be helpful for searching for more information.

Thanks!
 
You'll have to create your own menu, then setup an event handler for it. I've use the mouseup/mousedown events:

Private Sub ListView1_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)

If Button = vbRightButton Then
PopupMenu mnuMyMenu
End If

End Sub
 
see thread222-898499

Two strings walk into a bar. The first string says to the bartender: 'Bartender, I'll have a beer. u.5n$x5t?*&4ru!2[sACC~ErJ'. The second string says: 'Pardon my friend, he isn't NULL terminated'.
 
jcrater, thats exactly what i needed! thanks so much.

is there a way that a right click can select a cell as well?
as it stands now, i have to left click to select a cell and then right click for the menu.
 
do
Code:
grd.Row = grd.MouseRow
grd.Col = grd.MouseCol
before you do your code to popup the menu.
 
A thousand thank you's to bjd4jc and jcrater!

All sing their praises.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top