.NET

Reply
Valued Contributor
dynamicscope
Posts: 95
Registered: ‎04-04-2012
Message 1 of 3 (177 Views)
Accepted Solution

Adding "Separator" in a PopMenu

177 Views, 2 Replies
06-28-2012 02:15 AM

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

Valued Mentor
cadMeUp
Posts: 331
Registered: ‎05-11-2006
Message 2 of 3 (158 Views)

Re: Adding "Separator" in a PopMenu

06-28-2012 06:45 PM 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)'

Valued Contributor
dynamicscope
Posts: 95
Registered: ‎04-04-2012
Message 3 of 3 (142 Views)

Re: Adding "Separator" in a PopMenu

07-04-2012 09:12 PM 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.

Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.
Need installation help?

Start with some of our most frequented solutions or visit the Installation and Licensing Forum to get help installing your software.