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

Remove node from TreeView with ContextMenuStrip (when selection is disabled)

I have a TreeView with a node. Selection is disabled for it with: Private Sub TreeList_BeforeSelect(sender As Object, e As TreeViewCancelEventArgs) Handles TreeList.BeforeSelect e.Cancel = True End Sub I was not able to find a way, to…
CruleD
  • 1,153
  • 2
  • 7
  • 15
-1
votes
1 answer

contextMenuStrip add Symbols in Margin C# Windows Form Application

I have contextMenuStrip with 6 menu items. In the Margin displayed by default on left, I want to add special characters or Symbols as ↓ on the Margin. This is not image but special characters added by shortcut on keyboard. Please Help.
Pax
  • 65
  • 1
  • 4
  • 19
-1
votes
1 answer

ContextMenuStrip is Disabled within a Modal Form

I have encountered some bizarre behavior when trying to implement a context menu on a DataGridView that lives in a modal dialog (custom Winform shown using .ShowDialog() method). When I add the context menu to the DataGridView (using the relevant…
NSami
  • 1
  • 3
-1
votes
1 answer

How can I programmatically add a Context Menu Strip to all controls on a win Form in c#

I have a Context Menu Strip (contextColorOptions) that allows the ability to change the background color and forecolor of whatever sourcecontrol accessed the Context Menu Strip. private void backgroundColorToolStripMenuItem_Click(object sender,…
Brett53559
  • 39
  • 10
-1
votes
1 answer

how can i use 1 contextmenustrip on many buttons

my Program has many buttons. i like to use "1" contextmenustrip when i right click on a button you get a options like "change color red". my problem is that i dont know how to code this for all the button. private void…
-1
votes
1 answer

Iterate over ContextMenuStrip items in VB.NET

I would like to iterate over all items in a ContextMenuStrip. Can somebody please help me out here? I was trying this, but it didn't work out: For Each it As ToolStripItem In Me.ContextMenuStrip1.Items Thank you!
tmighty
  • 10,734
  • 21
  • 104
  • 218
-2
votes
1 answer

C# ContextMenuStrip items insertion without loop

How to add List items in contextMenuStrip with any loop? Is there any way like DataBinding etc?
-6
votes
2 answers

Rename a checkbox by implementing ContextMenu c# winforms

I have set of dynamically created checkboxes on a panel and also have implemented ContextMenuStrip on all checkboxes. I am unable to detect that which control currently displays the shortcut menu defined in the ContextMenuStrip.
Vipin Sharma
  • 594
  • 5
  • 19
1 2 3
19
20