Questions tagged [contextmenustrip]

ContextMenuStrip should appear when a user right-clicks, reacting to the surroundings. It represents a shortcut menu in C#.

ContextMenuStrip replaces ContextMenu. You can associate a ContextMenuStrip with any control, and a right mouse click automatically displays the shortcut menu. You can show a ContextMenuStrip programmatically by using the Show method. ContextMenuStrip supports cancelable Opening and Closing events to handle dynamic population and multiple-click scenarios. ContextMenuStrip supports images, menu-item check state, text, access keys, shortcuts, and cascading menus.

For more details: http://msdn.microsoft.com/en-us/library/system.windows.forms.contextmenustrip(v=vs.110).aspx

293 questions
0
votes
3 answers

CSS Menu Navigation

I cannot understand what this codes means - 1) .main ul ul, 2) .main ul li:hover ul ul 3) .main ul li:hover ul 4) .main ul ul li:hover ul These codes are applied to hide or display menus & sub-menus .Those who are aware of CSS knows well of these…
raaz
  • 5
  • 2
  • 5
0
votes
1 answer

C# ContextMenuStrip sub menu properties

Can anyone tell me how to get at the properties for the submenu in a ContextMenuStrip? I know I can create a form and drop a context menu strip onto it. If I then add some items to the strip: List item Pens -- Red -- Blue Markers -- Green --…
AidanO
  • 868
  • 1
  • 11
  • 33
0
votes
1 answer

ContextMenustrip is not closing automatically when i press WindowsLogs+D

I have contextmenustrip named "cmsView" in my application. When i right click the mouse button the cmsView has opened and click some where in the application cmsView gets closed. If I opened the cmsView and press Windowslogo +D(i.e, minimize the…
Tanya
  • 1,571
  • 5
  • 22
  • 33
0
votes
1 answer

Add MenuItems to a ContextMenuStrip from SubItems of a ListView

My Form defines a ContextMenuStrip: Dim CMS As New ContextMenuStrip Button1.ContextMenuStrip = CMS There is also a Listview with 5 columns and some data: ListView1.View = View.Details How can I display the content of SubItems at index 1 and K of…
Lider13
  • 47
  • 7
0
votes
3 answers

Visual Studio 2019 menustrip item click event

I've been working for a while on a school project which involves menustrip items in a C# windows forms application. I'm currently working in Visual Studio 2019. I've tried over and over again to find a way to conveniently add "click" event methods…
0
votes
1 answer

ContextMenuStrip on User control containing Richtextbox C#

I have made a custom control which consists of a richtextbox and a picture box. Now i want to include a contextmenustrip on the richtextbox actually. But the code which i want to call on click of the different menus on the menustrip belongs to the…
Anirudh Goel
  • 4,571
  • 19
  • 79
  • 109
0
votes
3 answers

ContextMenuStrip Requires Two Right Clicks to Display

I like to create my contextmenu's programmatically. I generally do not add the items to the contextmenustrip until it is opening as the items that get displayed are dependent on other aspects of the design that are variable. I have found that the…
Dan
  • 89
  • 6
0
votes
0 answers

VB.NET - Invoke ContextMenu Item Click Programatically for WebBrowser control

I am having a WebBrowser control and loaded a local image into an IMG tag and set the DocumentText of the WebBrowser as below
bkar81
  • 25
  • 7
0
votes
1 answer

ToolTipText popping up underneath control

I've got a .NET app with a NotifyIcon that sits in the systray. That nic has a ContextMenuStrip and that ctx mnu has several ToolStripMenuItems in it. Most of them have their ToolTipText set at run-time. The problem is that most of the time, the ttp…
WATYF
  • 409
  • 1
  • 5
  • 16
0
votes
3 answers

Checking if ContextMenuStrip contains an item

I have a ContextMenuStrip, at runtime I add new items to that ContextMenuStrip and I want to know how I can check if the ContextMenuStrip contains the item, if the same item is already in the ContextMenuStrip then dont add the item again. Only add…
user13898916
0
votes
1 answer

C# UITypeEditor Dropdown Not Working With Click Event

WHAT I'M TRYING TO DO Hello everyone. I'm trying to make a dropdown inside a property grid. This dropdown for some objects will just place its text inside the property, like a StringConverter. But for other objects, it behaves like a button and will…
user10589047
0
votes
0 answers

ContextMenuStrip does not appear when clicking on object within a UserControl

I created a UserControl with a chart inside that are the same size. In my main form I create these UserControls dynamically and I can delete or edit them using a ContextMenuStrip by right clicking. The problem happens when I create dynamically and…
Neuronio
  • 1
  • 1
0
votes
0 answers

RowIndex Returns Error in ContextMenuStrip

I've been looking for a way. To Edit, update and delete my data using a contextmenustrip. Basically what I want is for my contextmenustrip to be able to interact with Datagridview, the problem is whenever I set the code for click event. it shows an…
0
votes
1 answer

Get text on items and sub-items contextmenustrip

I have a contextmenustrip in the toolStripDropDownButton with the following items and sub-items: private void addItem() { toolStripDropDownButton1.DropDown = this.contextMenuStrip1; contextMenuStrip1.Items.Add("item A"); …
Kolimondi
  • 87
  • 1
  • 5
0
votes
0 answers

Right mouse click functionality is not working in DataGridView

In DataGridView (C# WinForm app) I have programmed, if a row is selected and you right click on a RowHeader, the ContextMenuStrip is shown. It was meant the ContextMenuStrip can show only if you click only on the RowHeader: private void…
Plemic
  • 1