.NET

Reply
Valued Contributor
95 Posts
3 Kudos
Registered: ‎04-04-2012
Post 1 of 3
Accepted Solution

Adding "Separator" in a PopMenu

212 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
331 Posts
12 Kudos
Registered: ‎05-11-2006
Post 2 of 3

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
95 Posts
3 Kudos
Registered: ‎04-04-2012
Post 3 of 3

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
Announcements
Are you interested in helping shape the future of the Autodesk Community? To participate in this brief usability study, please click here. Your time and input is greatly appreciated!