Diese Seite mit anderen teilen ...

Informationen zum Thema:
WinDev Forum
Beiträge im Thema:
Erster Beitrag:
vor 5 Jahren, 2 Monaten
Letzter Beitrag:
vor 5 Jahren, 2 Monaten
Beteiligte Autoren:
Alexander S., Cesar Flores

Right Click WB

Startbeitrag von Cesar Flores am 16.05.2013 14:57

Hi all,!!

I would like to know if any of you know how to recognize when the end user right click on Use the control and shoot some certain event, an event like opening a new screen or something!

thank you very much in advance ..

Best Regards


maybe you need to use something like this for Enter key:

Key is int = JSInfoEvent("keyCode")
IF Key = 13 THEN
ExecuteProcess(BTN_Search, trtClick)

von Alexander S. - am 17.05.2013 10:55
thanks Alexander

i used your code and try to adapt it to my needs but with no good results.

i still can't identify when the user do a right click.

i appreciate your help.


von Cesar Flores - am 17.05.2013 13:32
There are a loot of information about right click and JS

von Alexander S. - am 17.05.2013 13:51
If you want your own context menu - this is very simple on the jquery:

$("#test").bind("contextmenu", function(e) {
return false; //

von Alexander S. - am 17.05.2013 14:07
Hi Alexander.
i don't know anything about JavaScript or JQuery
I thing this is the moment to learn a little bit.

can you help me with this?

i try to use this code in a JS browser procedure:

function inhabilitar(e)
var ev=e || event;
if (ev.button == 2)
return false

i think this code will help me to identify the right click and disable the contextmenu.

but i dont know what i should send as a parameter when i try to use this code line to call the JS procedure from the onload process of the mainpage:


where "something" is the parameter corresponding to the event!

i appreciate your help!
best regards

von Cesar Flores - am 17.05.2013 14:37
Simple place this to OnLoad

document.oncontextmenu = function (event) {
event = event || window.event;
event.preventDefault ? event.preventDefault() : event.returnValue = false;
OpenMyWindow(); // your function!!!

von Alexander S. - am 17.05.2013 15:01
Using Jquery you can assign the context menu for the certain control:

$('#CELL_1').bind('contextmenu', function(e) {
OpenMyWindow(); // your function!!!

you need include to the head section:

script src="http://code.jquery.com/jquery-1.9.1.js"; /script

von Alexander S. - am 17.05.2013 15:08
Zur Information:
MySnip.de hat keinen Einfluss auf die Inhalte der Beiträge. Bitte kontaktieren Sie den Administrator des Forums bei Problemen oder Löschforderungen über die Kontaktseite.
Falls die Kontaktaufnahme mit dem Administrator des Forums fehlschlägt, kontaktieren Sie uns bitte über die in unserem Impressum angegebenen Daten.