Questions tagged [toolstripmenu]

111 questions
0
votes
1 answer

How to fix the order of items within a ToolStripContainer

I have a ToolStripContainer with a MenuStrip and a ToolStrip inside, both at the top. They're arranged as usual on Windows with the menu bar above the toolbar. Now, Windows Forms and DPI scaling support has always been a bit iffy. While everything…
Joey
  • 344,408
  • 85
  • 689
  • 683
0
votes
1 answer

What's wrong in my dynamical ToolStripMenu script?

Why duplicate code? I read on a rampage in the xml data! and installing a toolstripmenu! but for some reason every so often put into the xml amennyi item is in! Why? here is the code: try { XmlDocument xml = new XmlDocument(); …
0
votes
0 answers

Disable ToolStripMenuItem highlight without losing background

So I have a MenuStrip with a couple of ToolStripMenuItems. Two of my ToolStripMenuItem components are having a background image (battery icon and shutdown icon). Now I want to disable the default MenuStrip mouse hover effect (that blueish…
mariusmmg2
  • 713
  • 18
  • 37
0
votes
1 answer

How to set user access by toolStripMenueItem in C# WinForm

I want to add in My project that admin can set access control to user. Suppose admin can select user name and module name and save it to database. When user successfully logged in he can only show the specific toolstripMenueItem which are added by…
0
votes
1 answer

C# why can't I get menu items with sub menu items in ToolStripMenuItem?

Want to create menus and submenus (which has also events on click) but cant figure out how to insert in DropDownItems already created object? When I insert commented code - get always just on last menu all subitems, other don't have it. …
Ivan Pericic
  • 522
  • 1
  • 8
  • 24
0
votes
1 answer

How to access items inside sub menu item in C# windows form application in ToolStripMenuItems?

There's a toolstripmenuitem in my Windows form Application. I need to access every sub menu items and check whether there is a specific menu item name is available and if that item found, I want to disable it. Eg: Report |__Stock …
Kasun Perera
  • 400
  • 1
  • 2
  • 11
0
votes
1 answer

Update ToolStripMenu Properties at runtime

how do we kinda "reroll" the properties checking after creating a ContextMenuStrip on c#? I want to be able to disable some submenus on a config page, but after the ToolStripMenu is created I cannot change its properties on runtime, it only takes…
0
votes
1 answer

Using List content for filtering datagridview C#

I've been struggling with this question for a few days now and I haven't found any answer yet; I created a ToolStripMenu array which is filled dynamically from a stored procedure: ToolStripMenuItem[] itemsDepto = null; itemsDepto = new…
0
votes
1 answer

ToolStripMenuItem items show in the incorrect location

I have a ToolStripMenuItem that contain submenus to select from. The problem is that they are displaying in the wrong place: I have this code that I used for the submenu (this was for the ToolStripCombobox -Thank you Reza for the solution-) of the…
Pucho
  • 370
  • 2
  • 20
0
votes
1 answer

C# Dynamically added ToolStripMenuItems disappears when minimizing (C# Winforms)

My Windows forms application creates the user menus at runtime given the user access privileges. It works fine, but when the app is minimized, then all menus vanish. The space is used, but the names and icons are gone (obviously no sub-menu is…
0
votes
1 answer

How to get selected index of toolstripbutton in c#

I have a toolstrip control on a form and i programatically add buttons to the toolstrip control using the below code toolStrip1.Visible = true; ToolStripItem t = new ToolStripButton(); t.Text =…
0
votes
1 answer

HOWTO: Consuming ToolStripMenuItem.DropDownItemClicked in VB.NET

I have a toolStripMenuItem which is a menu containing other dropdown items. When DropDownItemClicked event is raised by selection one of the dropdown items I would like to consume the event if some condition is satisfied, like below: Private Sub…
Willy
  • 9,848
  • 22
  • 141
  • 284
0
votes
1 answer

Avoid toolstripmenu closed on item selected

I have a system tray application on vb.net. This app has a menu with several options. There is an option to select the language app. This language option has three submenus: english, french and spanish. Below is the snipet code of the three…
Willy
  • 9,848
  • 22
  • 141
  • 284
0
votes
1 answer

Unable to assign a click event to an eventhandler that uses an extended eventargs argument

I am trying to assign an event handler that uses an event argument that extends System.EventArgs to a ToolStripMenuItem. When I enter the name of the handler it wants to create an event handler that uses System.EventArgs. This is for a list of…
Tom Magaro
  • 181
  • 3
  • 13
0
votes
1 answer

ToolStripMenuItem: Add arrow without submenu

How can I add a menu item that has an arrow to the right as if there would be a submenu but does not show a submenu? Background: For a managed C# application I want to add a submenu which is created in an unmanaged DLL (using TrackPopupMenu()). In…
divB
  • 896
  • 1
  • 11
  • 28