I have a simple context menu. And I would like to add a title item to it, which cannot be selected, not even highlighted with the mouse cursor. When I set Enabled = false;
I still can mark it and it feels stupid because it's obviously disabled and the text is gray.
Example:
Like this. I can't mark or select the "Menu" item. It must never be blue. So I want this in my C# application. Simple, no styles.
Test code:
public Form1()
{
ContextMenuStrip = new ContextMenuStrip();
ContextMenuStrip.Font = new Font("Arial", 8);
ToolStripItem a = ContextMenuStrip.Items.Add("--- Title ---");
a.Enabled = false;
a.Font = new Font("Consolas", 16, FontStyle.Bold | FontStyle.Italic);
ContextMenuStrip.Items.Add("Alice");
ContextMenuStrip.Items.Add("Bob");
ContextMenuStrip.Items.Add("Conrad");
}