.NET

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

Adding "Separator" in a PopMenu

158 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 (139 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 (123 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.

You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

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 to get help installing your software.

Ask the Community