ContextMenu - Underline Break between items

  • Thread starter Thread starter Phil Jones
  • Start date Start date
P

Phil Jones

With the pop-up ContextMenu class, I've seen instances where the menu has
divider underlines between items. I can't figure out how to get my items to
have divider lines however.

How is this done?

Thanks everyone!
===
Phil
 
With the pop-up ContextMenu class, I've seen instances where the menu has
divider underlines between items. I can't figure out how to get my items to
have divider lines however.

How is this done?

Thanks everyone!
===
Phil

I'm sure if I understand your question, but I think you want to add a
separator line between two menu items.
Two ways to do that:
1. In the designer
Just user "Insert Separator" instead of "Insert New" when right clicking on
the context menu

2. In the source code
MenuItem separatorItem = new MenuItem;
separatorItem.Text = "-"; // yes, this makes it a separator !!
contextMenu.MenuItems.Add(separatorItem);

hth
 
Ah ha!! Setting the text to "-". I would never have figured that out on my
lonesome.
====
Cheers Claudio!
 
Back
Top