1
This is the expected behavior of a menu. Swap the component for a ToolStrip
and add a label.
1
1
My guess is you’re looking for class ToolStripLabel
which is just a Label that can be used in conjunction with a Menustrip.
Toollabel is descended from ToolStripItem
so can be added to the collection MenuStrip.Items
.
To use it just add one ToolStripLabel
the collection MenuStrip.Items
:
menuStrip1.Items.Add(new ToolStripLabel("PT Stack Overflow"));
To add it as sub-item from another ToolStripMenuItem
use the property ToolStripMenuItem.DropDownItems
of the item in which you want to add it:
ToolStripLabel MenuLabel1 = new ToolStripLabel("PT Stack Overflow");
((ToolStripMenuItem)menuStrip1.Items[0]).DropDownItems.Add(MenuLabel1);
thanks for the help, hug :D
Browser other questions tagged c# winforms
You are not signed in. Login or sign up in order to post.
I don’t know if you can understand the publication. You want a strip that is only informative?
– Jéf Bueno
That’s right, I think it’s stupid of me, but I used it that way because I didn’t know how to perform a previous procedure, so I did it with Menu Strip
– Gustavo Pedro