right-click

Right-click on a Listbox in a Silverlight 4 app

岁酱吖の 提交于 2019-12-01 00:16:29
I am trying to implement what I used to take for granted in Winforms applications. I am a Silverlight noob, so hopefully all this is elementary. I have a listbox in a Silverlight 4 app. I'd like to do the following: Right-click on the listbox Have the item under the location where I click highlight itself I'd like a context menu to popup (with my own items in the context menu) From my research so far, it appears that there is no ContextMenu construct in Silverlight, instead we have to build up a Grid/Canvas structure and attach it to a Popup object, which is what is then popped up. My

How to disable right-click save on one specific image only

混江龙づ霸主 提交于 2019-11-30 19:41:12
问题 I'm running an Asian e-commerce site where users post images of their products. Is there a way to disable right click for only 1 specific image on the page? E.g. When viewing a product, there is a large image, and then some thumbnails of the product. When trying to right click on the large image, I want to disable right click, but if they try to right click on the thumbnails, I don't want to have right click disabled. Thanks ps - I fully understand the usability reasons why NOT to disable

Right-click on a Listbox in a Silverlight 4 app

假装没事ソ 提交于 2019-11-30 18:24:43
问题 I am trying to implement what I used to take for granted in Winforms applications. I am a Silverlight noob, so hopefully all this is elementary. I have a listbox in a Silverlight 4 app. I'd like to do the following: Right-click on the listbox Have the item under the location where I click highlight itself I'd like a context menu to popup (with my own items in the context menu) From my research so far, it appears that there is no ContextMenu construct in Silverlight, instead we have to build

Unable to detect right mouseclick in ComboBox

别说谁变了你拦得住时间么 提交于 2019-11-30 15:16:19
I have a ComboBox that is a simple drop down style. I wanted to open a new window when the user right clicks on an item in the list, but am having trouble getting it to detect a right click has occurred. My code: private void cmbCardList_MouseClick(object sender, MouseEventArgs e) { if (e.Button == MouseButtons.Right && cmbCardList.SelectedIndex != -1) { frmViewCard vc = new frmViewCard(); vc.updateCardDisplay(cmbCardList.SelectedItem); vc.Show(); } } If I change e.Button == MouseButtons.Left the whole thing fires off just fine. Any way I can get this working as I intend? I'm afraid that will

Right click to select row in dataGridView

隐身守侯 提交于 2019-11-30 13:01:50
问题 I need to select a row in dataGridView with right click before ContextMenu shown because contextMenu is row-dependendt. I've tried this: if (e.Button == MouseButtons.Right) { var hti = dataGrid.HitTest(e.X, e.Y); dataGrid.ClearSelection(); dataGrid.Rows[hti.RowIndex].Selected = true; } or: private void dataGrid_CellMouseDown(object sender, DataGridViewCellMouseEventArgs e) { if (e.Button == MouseButtons.Right) { dataGrid.Rows[e.RowIndex].Selected = true; dataGrid.Focus(); } } This works but

how can you do right click using selenium?

落爺英雄遲暮 提交于 2019-11-30 12:07:27
im trying to preform a right click using selenium, any thoughts on how to do this? Felix Kling Please see docroots's answer for selenium. To generally simulate a right click in JavaScript, have a look at JavaScript simulate right click through code . Peter Agnew According to the OpenQA.Selenium.Interactions Namespace . // step 1 - select the element you want to right-click var elementToRightClick = this.Driver.FindElement(By.Id("elementtoclickonhasthisid")); // step 2 - create and step up an Actions object with your driver var action = new OpenQA.Selenium.Interactions.Actions(this.Driver);

How can I detect a rightmouse button event on mousedown?

夙愿已清 提交于 2019-11-30 11:12:30
I am updating/debugging and expanding the capabilities of my draggable script and I need to be able to achieve the following result: whatever.onRightMouseButtonMousedown = preventDefault(); I have done a lot of research to no avail, however, I know that it is possible to do this because when I use jquery-ui draggable, it prevents the ability to drag elements when you mousedown with the right mouse button. I want to mimic this ability, and learn how it works so that I can implement it now and in the future as needed. Note: Please do not give me information about how to use jquery or jquery-ui

Right Click to select items in a ListBox

回眸只為那壹抹淺笑 提交于 2019-11-30 10:59:40
I'm trying to make a list of items that you can do several actions with by right-clicking and having a context menu come up. I've completed that, no problem whatsoever. But I'd like to have it so that when you right click on a item, instead of leaving the current item selected, to select the item the mouse is over. I've researched this and other related questions, and I've tried to use indexFromPoint (which I found through my research) but whenever I right click on a item, it always just clears the selected item and doesn't show the context menu, as I have it set so that it wont appear if

How to generate a right-click event in all browsers

落花浮王杯 提交于 2019-11-30 08:50:39
问题 A little context: The app I'm working on has a right-click context menu for certain objects on the screen. The current design as that each of these objects listens for a right-click, sends an AJAX request to get the context data for that object, uses that data to create a PopupMenu2 from Dojo 0.4.3 (I know!), and then generates a right-click to launch the Dojo menu. I'm trying to figure out a way to generate a right-click event for all browsers. Currently, we only support IE and use the

Why right click is not working on java application?

人盡茶涼 提交于 2019-11-30 07:46:26
I had made one Java Swing based application. On my application,if i click anywhere on the JFrame or anything, then my right click is not working? i had not set anything like that..then why is not working? Basically my key board was not working then i try to copy - paste data using mouse then, i came about to know that...my right click is not working on any area of my application... Your right click is working just fine - in Swing it's normal to not be getting the context menus you're used to in other apps. If you want to have a popup menu that opens up on right click with cut/copy/paste