contextmenu

Launch window's System Menu on custom window

我与影子孤独终老i 提交于 2019-12-30 08:36:22
问题 I would like to call the ContextMenu when you click on application's icon or right mouse click on the title bar of application. This is the ContextMenu I mean: I need it because I made custom control that acts like window. I need this behavior to complete my control. EDIT: Leo Lorenzo Luis asked for me code: https://skydrive.live.com/?cid=c3392940f5cf5f74&id=C3392940F5CF5F74%21107&authkey=!APd2X3tDxWRfpL4 or: My MainWindow.xaml: <!--<Grid> <Border Name="TopBorder" BorderThickness="0.5,0,0,0"

Check which submenu item was clicked in context menu strip

怎甘沉沦 提交于 2019-12-30 06:59:07
问题 There is a ContextMenuStrip in a grid control. I have named it as GridContextMenu. The GridContextMenu is populated with 4 - 5 items using the following code : gridcontextMenu.Items.Add(new ToolStripMenuItem { Name = Plants, Text = Plants, Tag = Plants, Width = 100, Image = <image source is put here> }); gridcontextMenu.Items.Add(new ToolStripMenuItem { Name = Animals, Text = Animals, Tag = Animals, Width = 100, Image = <image source is put here> }); For the animal menu in tool strip, i added

How to add a menu item to Excel 2010 Cell Context Menu - old code doesn't work

若如初见. 提交于 2019-12-30 06:40:10
问题 I've tried 3 different code samples and they all fail. Here's the code from a MSFT employee (How to show a context menu on a range), the other two samples have pretty much the exact same code: private void ThisAddIn_Startup(object sender, System.EventArgs e) { CommandBar cellbar = this.Application.CommandBars["Cell"]; CommandBarButton button = (CommandBarButton) cellbar.FindControl(MsoControlType.msoControlButton, 0, "MYRIGHTCLICKMENU", Missing.Value, Missing.Value); if (button == null) { //

jQuery Context Menu clashes with jQuery Draggable

我们两清 提交于 2019-12-29 07:53:09
问题 I'm trying the jQuery Context Menu with jQuery Draggable rows in a jQGrid. The problem I'm having is that since I added the jQuery Context Menu the draggable action is triggered on single click (as well as the normal drag). It looks a little weird when I rightclick a row to get the menu, and then click outside it on another row (to discard the menu) and that row starts following the cursor. Does it have to do with the evt.stopPropagation(); in the following snippet from jQuery Context Menu? $

How to disable copy/paste commands in the Windows edit control context menu?

懵懂的女人 提交于 2019-12-29 05:36:13
问题 How can I disable those 3 standard cut/copy/paste commands in the context menu of the native Windows OS edit control? I also need to disable the equivalent clipboard-related commands like CTRL+C/CTRL+V. Is there a special edit control style or anything else we can use to disable all copy/paste operations with one easy setting? 回答1: Typically, when a control displays a popup menu, a WM_INITPOPUPMENU message is generated which " allows an application to modify the menu before it is displayed,

chrome extension context menus, how to display a menu item only when there is no selection?

可紊 提交于 2019-12-28 22:05:13
问题 What I want to do is: if the user does not select anything, display menu item A; if the user selects something, display menu item B. So far what I can get is: if the user does not select anything, display menu item A; if the user selects something, display both A and B. I want to know: how to make item A disappear when there is selection? Many thanks! Below is my code: var all = chrome.contextMenus.create ({ "title": "A", "contexts":["page"], "onclick": doA }); var selection = chrome

WPF ViewModel Commands CanExecute issue

岁酱吖の 提交于 2019-12-28 13:48:49
问题 I'm having some difficulty with Context Menu commands on my View Model. I'm implementing the ICommand interface for each command within the View Model, then creating a ContextMenu within the resources of the View (MainWindow), and using a CommandReference from the MVVMToolkit to access the current DataContext (ViewModel) Commands. When I debug the application, it appears that the CanExecute method on the command is not being called except at the creation of the window, therefore my Context

Is there a close event for the browser contextmenu

二次信任 提交于 2019-12-28 05:52:52
问题 I'm catching the contextmenu event using jQuery like this: $(document.body).on("contextmenu", function(e){ //do stuff here }); So far, so good. Now I want to execute some code when it closes but I can't seem to find a correct solution for this. Using something like the following would catch some of the cases, but not nearly all: $(document.body).on("contextmenu click", function(e){}); It wouldn't be executed when: the browser loses focus an option in the contextmenu is chosen the user clicks

How to handle onContextItemSelected in a multi fragment activity?

一世执手 提交于 2019-12-27 16:40:58
问题 I'm currently trying to adapt my application to use the "Compatibility Libraries for Android v4" to provide the benefits of the usage of fragments even to Android 1.6 users. The implementation of a context menu seems to be tricky: The main activity of the application is extending the FragmentActivity class. The fragments are all based on one class which extends the Fragment class. The fragment class is calling registerForContextMenu() in its onCreateView() method and overrides the methods

How to handle onContextItemSelected in a multi fragment activity?

点点圈 提交于 2019-12-27 16:40:16
问题 I'm currently trying to adapt my application to use the "Compatibility Libraries for Android v4" to provide the benefits of the usage of fragments even to Android 1.6 users. The implementation of a context menu seems to be tricky: The main activity of the application is extending the FragmentActivity class. The fragments are all based on one class which extends the Fragment class. The fragment class is calling registerForContextMenu() in its onCreateView() method and overrides the methods