Questions tagged [toolstripmenu]

111 questions
3
votes
2 answers

Capturing whole ToolStripMenu tree with ToString

If I run the code in varying areas of my menu tree, I only get the one element, how would you firstly apply this logic to all sub components of this menu tree and secondly, illustrate the whole tree. The code I have only shows 1 stage of each area…
3
votes
1 answer

Cannot catch Ctrl+Alt+F1 in WinForms MDI. Is it special?

My WinForms MDI application has several keyboard shortcuts set at ToolStripMeniItem items. Among the following ones: Ctrl+Alt+F1 Ctrl+Alt+F2 Ctrl+Alt+F3 the first one is never triggering its menu item. Others work as expected. Is it somewhere…
miroxlav
  • 11,796
  • 5
  • 58
  • 99
3
votes
1 answer

Disable ToolStripMenuItem highlight?

I have an application with a MenuStrip and every time I hover my mouse over a MenuItem, it highlights blue. I have tried to change the BackColor and ForeColor but that wasn't the problem. Is there a way to disable this?
number27
  • 93
  • 1
  • 3
  • 8
3
votes
2 answers

Custom Zedgraph ToolStripMenuItem won't check when clicked

I customize the right click menu thanks to this : lineGraphControl1.ContextMenuBuilder += new ZedGraphControl.ContextMenuBuilderEventHandler(MyContextMenuBuilder); And private void MyContextMenuBuilder(ZedGraphControl control, ContextMenuStrip…
Thomas Ayoub
  • 29,063
  • 15
  • 95
  • 142
3
votes
2 answers

C# Winforms Dynamic menu entries

I'm attempting to create a dynamic menu strip in my program. Here's an example of what it looks like right now: Creating the ToolstripMenuItems dynamically itself is easy. What I plan to do is to check if the current month already exists in the…
Joran Stoops
  • 153
  • 1
  • 13
2
votes
1 answer

ToolStripMenuItem ShowDropDown - event doesn't fire

I want to put a context sensitive menu on the right-click of a DataGridView. I want to have a single menu item derived from the content of the clicked cell and a variable number of items in a sub-menu, retrieved from a database. I do this by…
2
votes
2 answers

Color change for MenuItem

I am programming a Backup Tool. On top of my tool I have a menustrip containing two toolstripmenuitems. I changed the colors a little bit to my expectations. Not focused the menu looks great: When I now click on the menu item "File" to open the…
2
votes
1 answer

Customize ToolStripMenuItems in c#

I need to customize the ToolStripMenuItems in my application. Each ToolStripMenuItem that open a submenu has a black arrow near the text. I want to change some colors (MenuItemSelected, MenuItemBorder, MenuItemSelectedGradientBegin, ...) and the…
Martina
  • 791
  • 1
  • 14
  • 26
2
votes
3 answers

c# change already open form from another form?

C# windows forms: Is it possible to create a button that changes the text of a ToolStripMenuItem in another form that is already open? Something like: private void button1_Click_1(object sender, EventArgs e) { Form1.ToolStripMenuItem.Text =…
user3888775
  • 113
  • 3
  • 16
2
votes
3 answers

Adding an existing ToolStripMenuItem to a ContextMenu dynamically makes it disappear from its original place

I have a Form that has a menu called MenuEdit, with a ToolStripMenuItem called MenuEditElement inside. When I right click on a listview, I want to create a Context Menu dynamically, containing EditElement, among other things. I'm doing it like…
Pona
  • 167
  • 1
  • 17
2
votes
6 answers

How to find toolstripmenuItem with name

I have set visible property of my menuStrip1 items to false as foreach (ToolStripMenuItem itm in menuStrip1.Items) { itm.Visible = false; } Now I know the Names of toolStripMenuItem and dropDownItem of the menustrip1. How to can I activate the…
Learner
  • 1,286
  • 6
  • 34
  • 57
2
votes
1 answer

How to add to ContextMenuStrip and ToolStrip same ToolStripButtons?

I have tool bar in my app and context menu with the same options, so I want to add ToolStripButtons to both ContextMenuStrip and ToolStrip, unfortunately I can't do this. Even when I add manually items to both it shows only on one. For now I have…
1
vote
1 answer

How do I filter ToolStripMenuItem mouse events in a Winforms application?

I have a .Net Winforms application with a ToolStrip that contains several ToolStripMenuItems. I would like to be able to intercept Mouse LButton down events on the ToolStripMenuItems. I have PreFilterMessage defined. I assume I should be able to…
JohnB
  • 3,921
  • 8
  • 49
  • 99
1
vote
1 answer

How to find a toolstripitem based on its name being a variable and then change the checked value of it

I have a ContextMenuStrip called: DGVContextStrip its displayed when the user right clicks on my datagridview. That MenuStrip contains an item called AddUpgradeTagToolStripMenuItem which contains sub items(dropdownitems), these sub items are all…
1
vote
0 answers

How do I set a submenu DropDownItem to CHECKED without Clicking on it?

I've created a contextmenu (ie displays on a right mouse click) at design time with 2 menu items. I'm subsequently using code to add submenu items eg. For the 2nd menu item I add the following 4 submenu items. (contextMenuStrip1.Items[1] as…
Doug
  • 113
  • 1
  • 5