contextmenu

Using MahApps Icons with ContextMenu

耗尽温柔 提交于 2019-12-10 16:48:25
问题 I am writing a WPF application using the MahApps Metro UI toolkit. http://mahapps.com/guides/quick-start.html From the guide on their website, I have basically finished my application and it looks slick. The only issue I have is I have not been able to find out how to use the icon packs they provide as contextmenu icons. Here's an visual example of what I'm trying to do. While I was able to get the original "Windows" menu item to display it's icon, I am unable to do the same for the

Prevent ToolStripMenuItem context menu from closing on click

冷暖自知 提交于 2019-12-10 16:34:09
问题 I'm trying to have my context menu stay on screen even after I click one of its dropdown items (when the shift key is pressed, though I don't think that matters to the issue). You can see an example of the behavior in Windows XP when you click on Start > All Programs > Accessories > [now hit your shift key] and click on Windows Explorer... The menu stays up. It's a C# app, using Winforms, development machine is Windows 7, production is either XP, Vista or 7. The toolstripmenuitem doesn't seem

Python3 Tkinter popup menu not closing automatically when clicking elsewhere

僤鯓⒐⒋嵵緔 提交于 2019-12-10 15:59:25
问题 I'm running Python 3.3.3 (and right now I'm on Ubuntu but I also develop on Mac and Windows, which I haven't yet tested). I have a Treeview object that responds to right click on items and shows a context menu depending on what you click... but I've noticed that if you right click somewhere else while the original menu is up, it just opens another one. In fact, normal clicking doesn't hide them either. Even when I close the window the menus still stay floating. The only way to get them to go

Is there a way to show a “blocking” WinForms ContextMenu?

喜欢而已 提交于 2019-12-10 15:39:44
问题 Is there a way to show a ContextMenu and block further execution until an item has been selected? In particular, I want to get behavior similar to ShowDialog() but for a ContextMenu . The straight forward approach doesn't work: ContextMenu cm = new ContextMenu(); cm.MenuItems.Add("1", (s,e) => {value = 1;}); cm.Show(control, location); since the Click callback isn't called directly from Show() but instead at some later point when the message loop processes the click event. If you are unlucky,

CKEditor 3.6.3 Enable browser spellcheck and disable context menu

流过昼夜 提交于 2019-12-10 15:27:58
问题 I'm trying to get a spellcheck into a very bare bones implementation of CKEditor . I've disabled ALL the toolbars and plugins, so we're just left with a simple text box that creates basic HTML. Is it possible re-enable the browser/OS spellchecking? The CKEditor contextual menu is also pretty useless. I wouldn't mind getting rid of that too if that's possible. 回答1: There's a config setting that disables the built-in spell checker if a browser provides one. It's set to true by default, try

TreeView ContextMenu MVVM Binding

前提是你 提交于 2019-12-10 13:44:57
问题 I currently have a UserControl that uses the MVVM model. In that control there is a TreeView, which displays some items. I have added a HierarchicalDataTemplate for this TreeView and in that template is a ContextMenu for the Items. In the ViewModel, which is DataContext of the control (named RestoresTreeViewControl) is a command I want to bind one of the menu items to. However what I have done doesn't seem to be working. I am getting the usual can't find source for binding reference. Here is

How to add check/Uncheck QAction in the context menu?

浪子不回头ぞ 提交于 2019-12-10 13:31:25
问题 I have created a context menu in Qt and I need the items in the menu works in a checked/Unchecked manner so that it toggles for every click on the respective item. How to add this feature to the QAction just like shown below? 回答1: Here is the relevant section from the manual. checkable : bool This property holds whether the action is a checkable action. A checkable action is one which has an on/off state. For example, in a word processor, a Bold toolbar button may be either on or off. An

ContextMenu position is messed up in Android 7

大兔子大兔子 提交于 2019-12-10 12:59:08
问题 I have an app with a simple listview and context menu in it. pre android 7, everything looks ok: when clicking an item at the bottom of the list: when clicking an item at the top of the list: But wit android 7... when clicking an item at the bottom of the list: when clicking an item at the top of the list: Was there any change in the position of the context menu? 回答1: I found a solution for this somewhere (can't remember where). The problem is between the new context menu and the Holo themes.

Loading image onto MenuItem is losing transparency on pre-multiplied alpha image

这一生的挚爱 提交于 2019-12-10 12:17:37
问题 I am really in need of some help here. I am trying to load an image which I believe to be 32bpp with pre-multiplied alpha onto a MenuItem (I followed this guide to make the image in GIMP). I am aware of the ContextMenuStrip class and do not want to use it. The following is the code I am using to set the image onto the MenuItem: // apis [DllImport("user32.dll", SetLastError = true)] static extern bool SetMenuItemInfo(IntPtr hMenu, uint uItem, bool fByPosition, [In] ref MENUITEMINFO lpmii);

Adding contextmenu to WP8 browser control

冷暖自知 提交于 2019-12-10 11:54:06
问题 I am trying to attach a context menu when user perform a hold gesture on a link on a webpage. I've searched the web and found some recommendations HERE if (webBrowser.IsScriptEnabled) { webBrowser.InvokeScript("execScript", "function eventListener(evt){ if (evt.type == 'MSPointerDown') { gestureHandler.addPointer(evt.pointerId); return; } if (evt.detail & evt.MSGESTURE_FLAG_END) { window.external.notify(evt.srcElement.tagName);}}"); webBrowser.InvokeScript("execScript","document