right-click

RIght-Click in GWT?

好久不见. 提交于 2019-12-10 03:09:24
问题 I am building an AJAX web app with GWT, and I want to use right-click for various things, just like in a desktop app. However, right-click produces the standard Web context menu and void onClick(ClickEvent event) never gets called. Has anyone figured out how to get this to work? thanks! 回答1: easy peasy, add a listener on the contextmenuhandler which will display a widget based on where the user right clicks. https://confluence.clazzes.org/pages/viewpage.action?pageId=425996 class MyWidget

NSWindow - Right click menu

自作多情 提交于 2019-12-09 06:52:49
问题 Is there any way to show a menu when a NSWindow is right-clicked? 回答1: Rightclick on a view in the window and you will find a property called "menu". Connect this menu property with the menu which should be shown after a right click. 回答2: Yes. NSWindow inherits from NSResponder , which has handy methods like -rightMouseDown:. edit Actually a better way to do it might be to use a custom NSView subclass for the window's contentView , and override -menuForEvent: (a method on NSView ) to return

Can't use jquery's click event handler to detect right click

柔情痞子 提交于 2019-12-08 22:10:42
问题 In trying to detect a right mouse click with jquery, I noticed that the click event handler doesn't seem to be fired off with a right mouse click, while the mousedown or mouseup event handler's do. For example, after a right click on the test div, the following alerts 'testing!': $('#test').mousedown(function(e) { alert('testing'); }); However, the following does not : $('#test').click(function(e) { alert('testing!'); }); Does anyone know why? 回答1: As this article puts it: There are no click

Creating RightClick Menu for Explorer

早过忘川 提交于 2019-12-08 08:32:52
问题 If some one can provide some sample articles on how to create Right Click Menu for Drives. Here is what needed: The right click menu will contain two additional things, i.e: Connect and Disconnect . Can we make it conditional? I mean for some condition The drive will make the Connect enabled(Ideally when not connected) and when connected it will disable the connect and enable the Disconnect. 回答1: Here is all the relevant documentation. Basically you want to create a COM object that implements

Visual Studio 2010 crashes on right click

五迷三道 提交于 2019-12-08 03:00:20
问题 I had this problem in Windows 7, and now with a post-formatted and very clean C:\ disk with Windows 8.1 x64, I have it too. When I am executing a Visual C++ application from within Visual Studio 2010 and I right-click to show the right-menu (for example to "Watch value" of a variable), Visual Studio comes unresponsive. To make VS become responsive, I have to go to Task manager to Stop the application in question. And the consequence of this and after I loose the flux of my debug session,

How to detect a Right Click event in Visual studio?

帅比萌擦擦* 提交于 2019-12-07 19:09:31
问题 Okay, so this should be a simple question, but I'm fairly new at programming, and I can't for the life of me figure out how to use a right-click event. All I want to do is call an event that does something when I right-click a picturebox. It's not in the events toolbar, and I feel like a real idiot. Any help would be greatly appreciated. I'm running the 2010 version. 回答1: You can use the mouse_down event and check if it is a right-click Private Sub PictureBox1_MouseDown(Byval sender As Object

Text deselected on right click in IE8

倖福魔咒の 提交于 2019-12-07 12:55:24
问题 I want the user selection from a text area in my page. I have a context menu that user can use on right-clicking the selection. This is my code to retrieve selected content from a textarea in IE8, var textComponent = document.getElementById('myTextArea'); var selectedText; // IE version if (document.selection != undefined) { textComponent.focus(); selectedText= document.selection.createRange(); alert(sel.text); } Now I notice that before allowing the blocked content(i.e the javascript) I can

GtkTreeView's row right click

岁酱吖の 提交于 2019-12-07 05:45:56
问题 How do I do something when user right click in a treeview's row? 回答1: It's really easy, just listen to the "button-press-event" signal and use treeview.get_path_at_pos() to figure the selected row: def button_press_event(treeview, event): if event.button == 3: # right click model, path = treeview.get_path_at_pos(int(event.x), int(event.y)) # do something with the selected path treeview.connect('button-press-event' , button_press_event) 来源: https://stackoverflow.com/questions/4570859

C# MouseClick Event Doesn't Fire On Middle Click or Right Click

孤者浪人 提交于 2019-12-07 00:30:21
问题 This seems like it it should work but its not. I put a debug stop on the SWITCH statement. This event is only getting triggered on left click. Nothing happens and method is not fired on middle or right click. Any ideas? P.S. I already tried using MouseUp and MouseDown events and same issue. Here is my code: this.textBox1.MouseClick += new System.Windows.Forms.MouseEventHandler(this.textBox1_MouseClick); private void textBox1_MouseClick(object sender, MouseEventArgs e) { switch (e.Button) {

jQuery: preventDefault() not working on input/click events?

十年热恋 提交于 2019-12-06 21:25:50
问题 I want to disable the default contextMenu when a user right-clicks on an input field so that I can show a custom contextMenu. Generally speaking, its pretty easy to disable the right-click menu by doing something like: $([whatever]).bind("click", function(e) { e.preventDefault(); }); And in fact, I can do this on just about every element EXCEPT for input fields in FF - anyone know why or could point me towards some documentation? Here is the relevant code I am working with, thanks guys. HTML: