Problem with gridview menu click
Posted
#1
(In Topic #510)
Regular

If I right click (menu) on a gridview cell both the _Click() and the _Menu() events are fired.
How can I intercept just the right click?
Posted
Regular

bill-lancaster said
…If I right click (menu) on a gridview cell both the _Click() and the _Menu() events are fired…
OK, I get it now.
I added this logic to my test code to get around the problem:-
Posted
Guru

I have carried out some tests and you are correct both events are triggered. As the 'Click' event is not classed as a mouse event you can't check the mouse buttons. I discovered that the 'Menu' event is triggered first so knowing that I was able to set up a trap for it.
<IMG src="https://www.cogier.com/gambas/GridViewClick.png">
</IMG>
Posted
Regular

Code (gambas)
Europaeus sum !
<COLOR color="#FF8000">Amare memorentes atque deflentes ad mortem silenter labimur.</COLOR>
<COLOR color="#FF8000">Amare memorentes atque deflentes ad mortem silenter labimur.</COLOR>
Posted
Regular

bill-lancaster said
How can I intercept just the right click?
Europaeus sum !
<COLOR color="#FF8000">Amare memorentes atque deflentes ad mortem silenter labimur.</COLOR>
<COLOR color="#FF8000">Amare memorentes atque deflentes ad mortem silenter labimur.</COLOR>
Posted
Regular

One thing that puzzles me with my test program, is that a 'right click' on the GridView results in the following event sequence:-
GridView_Menu
Form_Menu
GridView_Menu
Form_Menu
GridView_Menu
Form_Menu
GridView_Click
GridView_MouseUp
Posted
Regular

1 guest and 0 members have just viewed this.


