When creating a context menu, is there a way to have header text included? For example, when a user clicks a button, I want a context menu to show with two options. There should also be text above the options, with a sentence such as: 'Please select an option'.
Is this possible?
You can't do it with the designer but you can do it in code:
public partial class Form1 : Form {
public Form1() {
InitializeComponent();
contextMenuStrip1.Items.Insert(0, new ToolStripLabel("Please select an option"));
contextMenuStrip1.Items.Insert(1, new ToolStripSeparator());
}
}
You can make a menu with 4 elements in this order:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With