contextmenu

Context Menu Resets ComboBox's SelectedIndex

I have a ContextMenu that is displayed after a user right clicks on a ComboBox. When the user selects an item in the context menu, a form is brought up using the ShowDialog() method. If frmOptions.ShowDialog() = Windows.Forms.DialogResult.Cancel Then LoadComboBoxes() End If When that form is closed, I refresh all the...

Change ContextMenu Font Size in C#

Is it possible to change the font size used in a ContextMenu using the .NET Framework 3.5 and C# for a desktop application? It seems it's a system-wide setting, but I would like to change it only within my application. ...

WinForms context menu - not open in certain parts / detect underlying control

Hi all, I have a .NET 2.0 Windows Forms application. On this app there is a Form control with a Menu bar and a status bar. Also there's a ListView on this form. If I add a context menu to this form, the context menu will open when the user right clicks any part of the form, including the menu bar and the status bar. 1) How can I prev...

Qt context menu breaking selection in QTreeView

I have a QTreeView class with a context menu installed as follows: m_ui.tree->setContextMenuPolicy(Qt::CustomContextMenu); connect(m_ui.tree, SIGNAL(customContextMenuRequested(const QPoint&)), this, SLOT(ShowTreeContextMenu(const QPoint&))); ... void ShowTreeContextMenu(const QPoint& point) { m_treeContextMenu->exec(m_ui.tree...

Dynamically add items to a Context Menu & set Click action

Hi, I have a List of strings that is regenerated every 5 seconds. I want to create a Context Menu and set its items dynamically using this list. The problem is that I don't have even a clue how to do that and manage the Click action for every item generated (which should use the same method with different parameter DoSomething("item_nam...

How to create a function in my Windows context menu

I use jsmin to compress my javascript files before uploading them to production. Since I tend to have one "code-behind" javascript file per page, I wind up doing this a lot. I installed a Windows Powertoy that adds a context menu item in Windows Explorer, so I can "Open Command Window Here". When I click that, the command prompt opens...

Is there any way to change the Context Menu of a Web browser using Wpf (C#)

I would to change the menuitems in the default context menu provided in the Web Browser Control. I have already tried: webbrowser.contextmenu = mycontextmenu. Nothing changed. Is there a way to do this? ...

VB.net (desktop) context menu assigned to multiple controls owner problem

I have two different grid controls on the same form. They share the same context menu. I am having trouble determining which control is the owner when I select the context menu item. ...

How to show a Context Menu when you right click a Menu Item

I am porting an MFC application to .NET WinForms. In the MFC application, you can right click on a menu or on a context menu item and we show another context menu with diagnostic and configuration items. I am trying to port this functionality to .NET, but I am having trouble. I have been able to capture the right click, disable the clic...

Adding handlers to Dynamically Created Context Menu

I need to populate a context menu from a database at run time. I do not know the number of items that will be in the list, so I would like to handle the click event in a single place. How do I declare the handler so I can tell which menu item actually triggered the click. Thanks, Dave Public Function GetBookmarkContextMenu(ByVal aBo...

How to get the parent control from an assigned context menu using C#?

I have a few listview controls on a windows form and i've assigned a common contextmenustrip to them all using the properties grid in VS2005. Now when a selection is made from the contextmenu in any listview, is there a way i can get the correct hosting control of the raised menu? ...

Dynamic Context Menu on Treeview Nodes

Duplicate Of : http://stackoverflow.com/questions/2527/c-treeview-context-menus I've got a context menu on a Treeview, when the user right clicks it supposed to change based on the currently right clicked node's tag object. Currently I'm updating the context menu in after_select event, however this doesn't work when user right clicks t...

How can I add a context menu to the Windows Explorer for a Java application?

How would one go about adding a submenu item to the windows explorer context menu (like for example 7-Zip does) for a Java application? ...

Why databound ContextMenu items don't hide?

I wan't to hide/show menuitems in a contextmenu using some propery of databound object. But my menuitems don't hide, they behave as if their Visiblity would be set to Visibility.Hidden (not Visibility.Collapsed as it really is), what's the reason of such behaviour? Here's an example: XAML: <Window x:Class="MenuTest.Window1" xmlns=...

How can I add a context menu to a ListBoxItem?

I have a ListBox and I want to add a context menu to each item in the list. I've seen the "solution" to have the right click select an item and suppress the context menu if on white space, but this solution feels dirty. Does anyone know a better way? ...

Systray context menu - why are my commands not enabled?

I'm creating a WPF app and have a system tray icon with a context menu. For the menu items I want to use WPF commands but when I assign them they are always greyed out even though the (same) commands are enabled in other places. MenuItem menuItem = new MenuItem(); menuItem.Header = "Exit"; menuItem.Command = CustomCommands.ExitApplicati...

Eclipse RCP and JFace: Problems with Images in Context menu and TreeViewer

I'm working on an Eclipse RCP application. Today I experienced some troubles when displaying images in the context menu. What I wanted to do is to add a column to my table containing images of stars for representing a user rating. On Windows, this causes some problems, since the star images are squeezed up on the left corner of the table...

Creating custom contextmenu

I have a v simple dialog box that I would like to display as a context menu. I can catch the right click and show it as a modal dialog with no borders, if possible I would like it to look properly like the windows context menu (bar on lhs, blue border) - is there a way of doing this automatically to collect user desktop settings, (needs...

How do you show the Windows Explorer context menu from a C# application?

I have a file listing in my application and I would like to allow people to right-click on an item and show the Windows Explorer context menu. I'm assuming I would need to use the IContextMenu interface, but I'm not really sure where to start. ...

The correct way to find the TabItem from ContextMenu Command

I have the TabControl on which I am setting the ContextMenu. All ContextMenu elements have commands set. <ContextMenu x:Key="tabMenu"> <MenuItem Command="{x:Static tabs:TabCommands.Close}" /> <MenuItem Command="{x:Static tabs:TabCommands.CloseAllButThis}" /> <MenuItem Command="{x:Static tabs:TabCommands.CloseAll}" /> </ContextMen...