Is there a way to sense a double Right click in msflexgrid?
Printable View
Is there a way to sense a double Right click in msflexgrid?
something like:VB Code:
Private iButton As Integer Private Sub MSFlexGrid1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single) iButton = Button End Sub Private Sub MSFlexGrid1_DblClick() If iButton = vbRightButton Then Debug.Print "Double Right Click" End Sub
Yea i was hoping there was a way for the double click to sense it. It's amazing how many problems the double right click can cause since by default it doesn't even select the cell you click. Ill go with storing the button in a variable. Thanks.
it can be done manually with little effort, e.g.:VB Code:
Private Sub MSFlexGrid1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single) iButton = Button If Button = vbRightButton Then MSFlexGrid1.Col = MSFlexGrid1.MouseCol MSFlexGrid1.Row = MSFlexGrid1.MouseRow End If End Sub
Yea i know, but why not allow the same parameters to be passed to the click events. I'm sure it saves space to just pass them to the mouse down, I'm just a little mad cuz I learned this the hard way. someone was double clicking to move items from one grid to another but they were using the right mouse (don't ask me why) and it really messed up some data. I also have 15 grids on this screen so its just tedious.