.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Adding "Separator" in a PopMenu

2 REPLIES 2
SOLVED
Reply
Message 1 of 3
dynamicscope
666 Views, 2 Replies

Adding "Separator" in a PopMenu

How could I add a separator in a PopMenu?

I have a PopMenu as below.

I want to add a separator between the menu.

Could anyone give me a .NET sample code for it?

 

menubar.png

2 REPLIES 2
Message 2 of 3
cadMeUp
in reply to: dynamicscope

What kind of PopupMenu object type are you working with? The exact type?

 

For example:

 

System.Windows.Forms.ContextMenu menu = new ContextMenu();

menu.MenuItems.Add("-");

menu.Show(..., ...)

 

'Autodesk.AutoCAD.Interop.AcadPopupMenu' object has a method:

'AddSeparator(object Index)'

Message 3 of 3
dynamicscope
in reply to: cadMeUp

I was using Autodesk.AutoCAD.Customization.PopMenu.

 

And I got the separator.

The PopMenuItem constructor with no macro assigned is the equivalent of a separator.

 

Thank you for your help anyway.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report

”Boost