|
-
May 3rd, 2001, 08:06 AM
#1
menu
I would like to create a pop-up menu when a user clicks the right mouse button on a cell in a flexgrid.
Any suggestions?
Thanks,
Batsheva
-
May 3rd, 2001, 08:24 AM
#2
Re: menu
Option Explicit
use menu editor to add menus to your form. Set main(top) menu visible = false
leave submenu visible true.
Here I have a 3x2 flexgrid
a main menu called mnupop
a submenu called mnupopme
when I click last flexgrid cell, the mnupop appear
Beware: it appears also when I click on fixed cell at its left...
Private Sub MSFlexGrid1_Click()
With MSFlexGrid1
If .Row = 2 And .Col = 1 Then
PopupMenu mnupop
End If
End With
End Sub
Special thanks to Lothar "the Great" Haensler, Tom Archer, Bruno Paris and all the other wonderful people who made and make Codeguru a great place. Come back soon, you Gurus.
...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.
-
May 3rd, 2001, 08:41 AM
#3
Re: menu
Do you know how I check to see if it is a right mouse click?
Thanks!
-
May 3rd, 2001, 08:54 AM
#4
Re: menu
If you need to know what button it is, use the MouseDown Event. Then, you get a parameter Button, and you can check
If Button=vbRightButton then
...
endif
-
May 3rd, 2001, 09:12 AM
#5
Re: menu
Sorry, Shree. Although you're right, it is better to use the mouseUp event or it will not be triggered correctly showing a menu...
Special thanks to Lothar "the Great" Haensler, Tom Archer, Bruno Paris and all the other wonderful people who made and make Codeguru a great place. Come back soon, you Gurus.
...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
|