Questions tagged [menustrip]

This tag can be used in questions involving usage of MenuStrip class from Windows Forms (a GUI class library in the Microsoft .NET Framework).

255 questions
2
votes
1 answer

C# MenuStrip Panel visual anomalies

I'm coloring a menustrip to match my apps theme. However, every time I attempt it, I get this strange visual anomaly to the left of panel separators (the white rectangle) There is also some odd positioning of check-boxes also (possibly…
PersuitOfPerfection
  • 1,009
  • 1
  • 15
  • 28
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
0 answers

Change color of scroll buttons in MenuStrip

The problem is that I didn't find colors in ProfessionalColorTable for buttons which scroll very long DropDown MenuItem. So how can I change colors of this buttons?
Paviel Kraskoŭski
  • 1,429
  • 9
  • 16
2
votes
1 answer

How to align some MenuItems to the right with MenuStrip LayoutStyle set to Flow?

I would like to make it so that some of the buttons on a MenuStrip aligned to the right of the MenuStrip. For example, Focus ON and Focus OFF on the right side of the menu strip: MenuStrip I can get this to work if I set the MenuStrip's LayoutStyle…
Caleb
  • 135
  • 2
  • 10
2
votes
1 answer

How to call click event function of menustrip item C#?

I want to call the click function of MenuStrip in C# associated with the item of MenuStrip whose index i can provide e.g i want to call menuStrip1.Items[0] click function.
Mobin
  • 4,870
  • 15
  • 45
  • 51
2
votes
0 answers

How do you prevent Alt key from shifting focus to the MenuStrip?

I'm trying to add my own functionality for Alt-key shortcuts. I have a MDIContainer form, and I programatically add new forms (each with just a RichTextBox) as child forms at runtime. I then add custom handlers to the newly generated…
RapierMother
  • 339
  • 1
  • 3
  • 13
2
votes
2 answers

Loop through subitems in menustrip

Well i've tried this: private IEnumerable GetItems(ToolStripMenuItem item) { foreach (ToolStripMenuItem dropDownItem in item.DropDownItems) { if (dropDownItem.HasDropDownItems) { foreach…
Maged E William
  • 436
  • 2
  • 9
  • 27
2
votes
1 answer

VB 2010 : Add items in first menustrip

i want to add a new toolstripmenuitem, but at the first/beginning of menustrip item "a" named from visual design and item "1" named from code (as new toolstripmenuitem) how to put item "1" at the beginning / first position of menustrip ? thanks :)…
walk.this_way
  • 169
  • 1
  • 2
  • 11
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
2 answers

WebBrowser 'steals' shortcut keys

PROBLEM: I have a WebBrowser and have exposed its ActiveX methods. In my Form in which the WebBrowser is positioned I have a MainMenuStrip with shortcuts. Only when I am typing in a textbox on my Form do the shortcuts properly work. For example,…
Patrick Geyer
  • 1,515
  • 13
  • 30
2
votes
1 answer

Transparent form background with MenuStrip?

According to a lot of questions here on SO, the best way to make the background of a form transparent is to set it to a fairly unused color (like Magenta) then set the form's TransparencyKey to that color. this.BackColor =…
Abluescarab
  • 537
  • 8
  • 25
2
votes
2 answers

Resize Width of MenuStrip

I want to put a gap between menustrip and form at right of menuStrip. I used autosize= false and new size properties, height of menustrip is changed but width is not changed. Menustrip's width remain same with form's width. menuStrip2.AutoSize =…
Anil Kocabiyik
  • 1,178
  • 6
  • 17
  • 47
2
votes
1 answer

disable MenuStrip autohide on dropdown selection

When i select any option from the drop-down of the Menu-strip control, the Code in its Click event is fired and the drop-down collapses. But i want that drop-down must stay open. Please help If i open a dialog on click of the item in this menu,…
Genius
  • 1,084
  • 2
  • 10
  • 20
2
votes
1 answer

How to detect a MenuStrip's open and close states ?

I need to detect whenever the MenuStrip (NOT a contextmenu) is opened and closed. The Enter and Leave events do not seem to work. Why I need it: I use a MenuStrip with options like "File", "Edit", "About", etc. But when the menu strip is active, and…
Napoleon
  • 1,072
  • 5
  • 17
  • 31
2
votes
2 answers

Passing a value to an event handler

I have dynamically added a few items to my Menu Strip and triggered and event for each item added to the strip (items are added from an XML file). What I'm trying to do next is to pass the text from each item to the event handler so I can use them…
B.B10
  • 171
  • 1
  • 7
  • 16