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
1 answer

How know if right click is on a "text being edited" not/before "text changed" event in winforms?

My question might be simple but I couldn't find specific answer on web. I have a winforms application with a grid inside, in which I have implemented a context menu to be shown on right click on cells. These cells include text elements that can be…
CageE
  • 419
  • 4
  • 13
0
votes
2 answers

Make TextBox Editable by ContextMenuStrip - c# winform

I have a textbox in my C# Winform. The program assigns a value to the textbox by default. I want the user to have a right click function to edit this text at runtime. So when the user right click to edit, the backgroud should become white and user…
blackfury
  • 675
  • 3
  • 11
  • 22
0
votes
0 answers

ContextMenuStrip ToolStripLabel Image in wrong place

I have a tray icon with a context menu. I'm adding things to the ContextMenuStrip such as ToolStripLabel. I want the label to have an icon all the way on the left. However, the icon is displayed on the right side of the menu item with the text. …
spujia
  • 147
  • 1
  • 6
0
votes
1 answer

Call explorer context menu in listview

Below image is a screenshot of beyond compare which calls windows explorer context menu of a file/folder when right-click and select Explorer menu. Call-Explorer-Context-Menu Please help to make it on vb.net, or please share a link for a tutorial.…
d. ave.
  • 15
  • 6
0
votes
0 answers

C# - How to Store Multiple Informations (mapped)

i have a huge Problem and i don´t know with which methode i should solve it... The current state of the Program: The User is currently able to create new Items of a ToolMenuStrips during runtime. The MenuStrip ALWAYS has 3 Layers. for example:…
0
votes
0 answers

Apply same contextmenustrip to more textboxes

Is there a way to apply the same contextmenustrip to more textboxes? I have a WinForm with 6 textboxes and I want my context menu strip to clear the context of a texbox. private void stergeContinutToolStripMenuItem_Click(object sender, EventArgs…
0
votes
1 answer

ContextMenuStrip submenu position (C#, Win Forms)

i have a two level ContextMenuStrip which open by a NofiyIcon right click. I create this menu in code. menuitem1 --- submenu1 --- submenu2 --- submenu3 menuitem2 --- submenu1 --- submenu2 ---…
kovak
  • 73
  • 1
  • 9
0
votes
1 answer

ContextMenuStrip Opening Event

I have a ContexMenuStrip cms on my project. And i'm trying to add this event to my code, but it isn't triggering when i right click on my mouse. The menu appears but the event isn't called. void cms_Opening(object sender, CancelEventArgs e) { …
Bruno Miguel
  • 1,003
  • 3
  • 13
  • 26
0
votes
1 answer

How can a ContextMenuToolStripItem be displayed, without doing it programmatically?

I've taken over a project, which contains some UltraWinGrid controls on some of the forms. On one of the original forms which has been there since before I took on the project, there is a ContextMenuStrip, which has just one ContextMenuToolstripItem…
David
  • 2,298
  • 6
  • 22
  • 56
0
votes
0 answers

Strip Status Label does not display image in Image Margin (Context Menu Strip)

I am trying to insert an image into a StripStatusLabel, but for some reason it is not displayed on the left side, like a StripMenuItem. Inserts are being made in the same way: Dim test As New ToolStripStatusLabel ("Teste") Dim exiting As New…
jumar
  • 1
  • 1
0
votes
0 answers

The selection(highlighting) of an item using the arrow keys are overwritten by the previous mouse pointer selection in a ContextMenuStrip

Problem In my ContextMenuStrip when i hover the mouse on an item, it is selected (highlighted) - which is nice Now I use up down arrow key and selects another item- It gets highlighted, which is also nice But after that the selection again goes back…
soms
  • 3
  • 2
0
votes
2 answers

DataGridViewComboBoxColumn and ContextMenuStrip

I have this partial code: DataGridViewComboBoxColumn cbC = new DataGridViewComboBoxColumn(); cbC.HeaderText = "Code:"; cbC.Name = "code"; cbC.ContextMenuStrip = mymenu;(is a ContextMenuStrip) I click with right mouse…
Infoservice
  • 107
  • 4
  • 16
0
votes
1 answer

Use ContextMenuStrip to change property of specific control, in vb.net

I have a relatively simple problem, I have a form with 3 pictureboxes, all I wish to do is make it so that you can change the color of a picturebox to either; Red, Amber or Green using a contextmenustrip. So they rightclick on the box and select a…
Bob.Tri
  • 55
  • 6
0
votes
0 answers

Add Combobox to column that is already inclued in a bounded datagridview

I want to have a data gridview that is bounded to SQL data source that has a column with name status also I need this column to be combobox, to be better to the user to select the value instead of writing it, is it possible ? I've searched and I've…
Sara
  • 86
  • 2
  • 11
0
votes
2 answers

Disable default menu of vb.net

I have a few question. Is it possible to disable this menu when i press rightclick? I have my own context menu strip and my problem is when i press right click that default menu is shown. then i will press left click to remove that default menu…
Muj
  • 146
  • 2
  • 21