.NET

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

Adding "Separator" in a PopMenu

186 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

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.

Valued Mentor
cadMeUp
Posts: 331
Registered: ‎05-11-2006
Message 2 of 3 (167 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 (151 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.

Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Need installation help?

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